ICEfaces
  1. ICEfaces
  2. ICE-1247

UIInput.requestFocus() not working in IE 6 & 7 when moving from unrendered to rendered

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: 1.6DR#4, 1.6
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: PC

      Description

      calling requestFocus() on a SelectInputText component doesn't seem to work in IE
      6 or 7. Tested with 1.5.3

        Activity

        Hide
        Philip Breau added a comment -

        1. open /support-3882/
        2. click 'focus input'

        • when being rendered on the same pass, the focus isn't applied
          3. click 'toggle hide input' so that the input is in the rendered state
          4. click 'focus input'
        • the input will now focus
        Show
        Philip Breau added a comment - 1. open /support-3882/ 2. click 'focus input' when being rendered on the same pass, the focus isn't applied 3. click 'toggle hide input' so that the input is in the rendered state 4. click 'focus input' the input will now focus
        Hide
        Rob Mayhew added a comment -

        I had to add a slight delay to the focus call (100ms). IE 6 and 7 now focus properly.

        r13596

        Show
        Rob Mayhew added a comment - I had to add a slight delay to the focus call (100ms). IE 6 and 7 now focus properly. r13596
        Hide
        Ted Goddard added a comment -

        A short delay prior to setting focus is unlikely to have any undesirable side effects (outside of focus behavior) as the delay wouldn't block anything else from occurring.

        However, the delay may mean that there is a period of time where nothing is focused, yet the user is expecting some component to be focused. We should take care to ensure that rapid focus operations on the part of the user aren't interfered with by setting the focus later.

        Show
        Ted Goddard added a comment - A short delay prior to setting focus is unlikely to have any undesirable side effects (outside of focus behavior) as the delay wouldn't block anything else from occurring. However, the delay may mean that there is a period of time where nothing is focused, yet the user is expecting some component to be focused. We should take care to ensure that rapid focus operations on the part of the user aren't interfered with by setting the focus later.
        Hide
        Rob Mayhew added a comment -

        In the case where a user changes focus before the server focus call is executed, the server focus call is ignored. Focus is only moved if the user is not interacting with the browser. (Keypress, or mouse click)

        Show
        Rob Mayhew added a comment - In the case where a user changes focus before the server focus call is executed, the server focus call is ignored. Focus is only moved if the user is not interacting with the browser. (Keypress, or mouse click)
        Hide
        Rob Mayhew added a comment -

        Added fix to 1.5 branch. r13650

        Show
        Rob Mayhew added a comment - Added fix to 1.5 branch. r13650

          People

          • Assignee:
            Unassigned
            Reporter:
            Philip Breau
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: