Skip to content

Tab order #81

Closed
Closed

Description

@itg-assistant

Alex Prinias asked 2016-06-01 18:53:31 UTC

Hi,

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.

Best regards,

Alex

Activity

  1. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    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?

  2. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    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

  3. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Alex Prinias answered 2016-06-01 21:37:41 UTC

    Setting the TabIndex works!

    Alex

  4. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions