Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Override to set focus back to first form item, when tabbing out of last formitem

    Hi,
    When a user tabs out of the last formitem in a form I want the focus to go back to the first formitem in the form. What should I override to accomplish this?

    I saw this method in the DynamicForm:
    _focusInNextTabElement

    which would be perfect to override, but it is obfuscated :-(. Is there another logical override point to accomplish this?

    gr. Martin

    #2
    One idea would be to catch the TAB with keyUp on the last FormItem and then focus on the first item.

    Another idea is to play with the FormItem.tabIndex. When the last item receives focus, change the tabIndexes so that a tab would give focus to the first item in the form.
    Hope this helps!

    Comment


      #3
      Thanks for the reply, it is sometimes complex to compute the first/last form item with expanded/collapsed sections and fields which are shown/hidden dynamically. Therefore a standard solution would be great.

      I hope that Isomorpic can answer this thread....

      Comment


        #4
        Bear in mind if you create a closed tab loop like this, it would be an accessibility violation unless there's some way to get get out of the loop via the keyboard.

        That said, if you need to do this, zeratus's said is pretty much right, and should involve just a loop checking for visibility of items and eligibility for tabbing.

        Comment

        Working...
        X