ICEfaces
  1. ICEfaces
  2. ICE-4120

Modal popup: limit tabbing to only cycle thru elements inside the popup, while active

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8RC2, 1.8
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Any

      Description

      Currently, it is possible to focus elements behind the modal window through tabbing and potentially activating them. Only in FF this is not possible. It is necessary to limit the elements that can receive focus via tabbing to only those contained in the modal popup, while it is active.

        Activity

        Hide
        Arturo Zambrano added a comment -

        fixed at revision... 18397

        The previous approach tried to prevent the default behaviour of pressing keys outside of the popup by means of an onkeypress event. The problem is that IE doesn't trigger onkeypress events that don't happen on a focusable element. Moreover, even on a focusable element, the event is not triggered for keys other than letters, numbers or the enter key (e.g. tab, arrows, pgdown, pgup, shift, ctrl, etc.) The same thing happens in Webkit browsers regarding the type of keys that trigger the event, but the event is still triggered even when no elements have focus when the key is a letter, number or enter.

        The new approach takes all focusable elements and sets their tabindex attribute to "-1", making them unreachable via the tab key. The previous tabindex values are restored when the modal stops.

        Show
        Arturo Zambrano added a comment - fixed at revision... 18397 The previous approach tried to prevent the default behaviour of pressing keys outside of the popup by means of an onkeypress event. The problem is that IE doesn't trigger onkeypress events that don't happen on a focusable element. Moreover, even on a focusable element, the event is not triggered for keys other than letters, numbers or the enter key (e.g. tab, arrows, pgdown, pgup, shift, ctrl, etc.) The same thing happens in Webkit browsers regarding the type of keys that trigger the event, but the event is still triggered even when no elements have focus when the key is a letter, number or enter. The new approach takes all focusable elements and sets their tabindex attribute to "-1", making them unreachable via the tab key. The previous tabindex values are restored when the modal stops.

          People

          • Assignee:
            Unassigned
            Reporter:
            Arturo Zambrano
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: