ICEfaces
  1. ICEfaces
  2. ICE-4461

Current component focus is lost on input level update.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.2 SP1, 1.8
    • Fix Version/s: 1.8.1
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      Focus + update + input elements

      Description

      The focus gets lost when there is an input level update.

        Issue Links

          Activity

          Hide
          Adnan Durrani added a comment -

          Attaching test case which demonstrates problem with IE 7.

          Show
          Adnan Durrani added a comment - Attaching test case which demonstrates problem with IE 7.
          Hide
          Mircea Toma added a comment -

          Introduce separate variable (not modified by component renderers) that keeps track of which element has focus. Restore focus on DOM update.

          Show
          Mircea Toma added a comment - Introduce separate variable (not modified by component renderers) that keeps track of which element has focus. Restore focus on DOM update.
          Hide
          Mircea Toma added a comment -

          Clear focus variable on blur.

          Show
          Mircea Toma added a comment - Clear focus variable on blur.
          Hide
          Ken Fyten added a comment -

          This fix doesn't seem to be impacting ICE-4401 and other similar tests positively.

          Show
          Ken Fyten added a comment - This fix doesn't seem to be impacting ICE-4401 and other similar tests positively.
          Hide
          Mircea Toma added a comment -

          Edit updated 'input' element instead of replacing it. Update style properties individualy so that IE will render new style since element.setAttribute('style',...) doesn't work as expected.
          There's a simpler solution described here but it does not work in IE7: http://www.quirksmode.org/bugreports/archives/2005/03/setAttribute_does_not_work_in_IE_when_used_with_th.html .

          Show
          Mircea Toma added a comment - Edit updated 'input' element instead of replacing it. Update style properties individualy so that IE will render new style since element.setAttribute('style',...) doesn't work as expected. There's a simpler solution described here but it does not work in IE7: http://www.quirksmode.org/bugreports/archives/2005/03/setAttribute_does_not_work_in_IE_when_used_with_th.html .
          Hide
          Ken Fyten added a comment -

          Note that the way that input elements were being updated was changed in 1.7.2 for ICE-3335. Back then instead of just updating attributes the entire element was replaced as a mechanism to work around IE not updating the rendered output based on changes to the style attribute on the element.

          However, this change resulted in other undesired side-effects, such as focus being lost in IE after the input element was updated in certain cases. The new fix keeps the original elements, so avoids the focus loss issues, but uses a new technique of changing the style attribute via the JS API instead of just updating it in the DOM, which solves the issue of IE not interpreting the new style values when they are updated.

          Show
          Ken Fyten added a comment - Note that the way that input elements were being updated was changed in 1.7.2 for ICE-3335 . Back then instead of just updating attributes the entire element was replaced as a mechanism to work around IE not updating the rendered output based on changes to the style attribute on the element. However, this change resulted in other undesired side-effects, such as focus being lost in IE after the input element was updated in certain cases. The new fix keeps the original elements, so avoids the focus loss issues, but uses a new technique of changing the style attribute via the JS API instead of just updating it in the DOM, which solves the issue of IE not interpreting the new style values when they are updated.
          Hide
          Adnan Durrani added a comment -

          enhanced testcase

          Show
          Adnan Durrani added a comment - enhanced testcase

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Adnan Durrani
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: