You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I add controls on a page programmatically, I would expect to be able to move from one control to the other using the tab key. However, the tab order, which I would expect to follow the order the controls were added on the page, is random.
Looks like all the controls have TabIndex = 0. When two controls have the same tab index I think that the javascript focus manager decides where to go next by using the z-order (not sure, have to check) which is actually the opposite of the order in the collection.
The TabIndex property is not increased automatically since there is no internal counter and child objects can have a different tab order within their container.
In my case I have what I call a FormBuilder which basically is a TableViewLayout into which I add the controls. And I might have more than one FormBuilders in a Form. I create the first one, add its controls one by one, place it on the container. Create the second one, place its controls and place it on the container. And so on. In this case the container is the tabpage of a TabControl.
In a tabpage with 4 formbuilders, when I press the tab key, the focus jumps randomly on controls in all 4 FormViewBuilders and as well on tabs of the containing TabControl. It's certainly not the order I put them on the page or z-index (the reverse as you said). It's random.
Perfect, thanks! I'll check what happens when the tabindex is all zero or all the same number. Could be that the framework crawls the DOM or uses the internal hash.
Activity
itg-assistant commentedon Jun 12, 2026
Luca answered 2016-06-01 20:11:45 UTC
Looks like all the controls have TabIndex = 0. When two controls have the same tab index I think that the javascript focus manager decides where to go next by using the z-order (not sure, have to check) which is actually the opposite of the order in the collection.
The TabIndex property is not increased automatically since there is no internal counter and child objects can have a different tab order within their container.
Did you try to set the TabIndex?
itg-assistant commentedon Jun 12, 2026
Alex Prinias answered 2016-06-01 20:31:11 UTC
Hi Luca,
In my case I have what I call a FormBuilder which basically is a TableViewLayout into which I add the controls. And I might have more than one FormBuilders in a Form. I create the first one, add its controls one by one, place it on the container. Create the second one, place its controls and place it on the container. And so on. In this case the container is the tabpage of a TabControl.
In a tabpage with 4 formbuilders, when I press the tab key, the focus jumps randomly on controls in all 4 FormViewBuilders and as well on tabs of the containing TabControl. It's certainly not the order I put them on the page or z-index (the reverse as you said). It's random.
I will try to set the TabIndex and let you know.
Alex
itg-assistant commentedon Jun 12, 2026
Alex Prinias answered 2016-06-01 21:37:41 UTC
Setting the TabIndex works!
Alex
itg-assistant commentedon Jun 12, 2026
Luca answered 2016-06-02 13:42:21 UTC
Perfect, thanks! I'll check what happens when the tabindex is all zero or all the same number. Could be that the framework crawls the DOM or uses the internal hash.