Tabbing to a field which triggers a Model Action loses focus

  • 1
  • Problem
  • Updated 4 years ago

I have 2 models: Location & Suburb.

On the Location model fields are:
  • Street Name
  • Suburb (Lookup to Suburb model)
There is also a model action on Location, that when the Row in Model is updated triggered by the Suburb field, it will update a value in the Location model and Saves the Location Model.

What we find from the user experience, is that when they tab from Street Name to Suburb, even before they start typing, it loses focuses from that field, and they have to click back on the Suburb field.

Is there some way around this?

Photo of Lapman Ho

Lapman Ho

  • 240 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,026 Points 5k badge 2x thumb
Are you using custom field renderers?  What if you disable the model action -- do you still see the weirdness?
Photo of Lapman Ho

Lapman Ho

  • 240 Points 100 badge 2x thumb
If I change the update field on change field to something other than Suburb, then the focus stays and I can tab to the field successfully.

Any thoughts?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,828 Points 20k badge 2x thumb
Here is a guess. 

I think you have a template somewhere else on your page that is tied to the Location model.  When the field starts getting updated - the template detects the change and re-renders and gets the focus. If you change the template so its not connected to that model you should no longer have the symptoms you describe.