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

          Adnan Durrani created issue -
          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.
          Adnan Durrani made changes -
          Field Original Value New Value
          Attachment ICE-4461.war [ 11722 ]
          Adnan Durrani made changes -
          Link This issue blocks ICE-4401 [ ICE-4401 ]
          Adnan Durrani made changes -
          Assignee Ken Fyten [ ken.fyten ]
          Ken Fyten made changes -
          Summary Focs gets lost on input level update. Current component focus is lost on input level update.
          Salesforce Case []
          Fix Version/s 1.8.1 [ 10170 ]
          Assignee Priority P1
          Affects Version/s 1.7.2 SP1 [ 10144 ]
          Assignee Ken Fyten [ ken.fyten ] Mircea Toma [ mircea.toma ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18855 Fri May 08 07:07:13 MDT 2009 mircea.toma ICE-4461 Introduce separate variable (not modified by component renderers) that keeps track of which element has focus. Restore focus on DOM update.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/element.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/application.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/focus.js
          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.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Mircea Toma made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18856 Fri May 08 09:06:40 MDT 2009 mircea.toma ICE-4461 Clear focus variable on blur. Simplify code.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/element.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/focus.js
          Hide
          Mircea Toma added a comment -

          Clear focus variable on blur.

          Show
          Mircea Toma added a comment - Clear focus variable on blur.
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          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.
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18867 Mon May 11 16:33:24 MDT 2009 mircea.toma ICE-4461 Rollback fixes.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/element.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/application.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/focus.js
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18869 Tue May 12 07:53:12 MDT 2009 mircea.toma ICE-4461 Edit updated 'input' element instead of replacing it. Update style properties individualy so that IE will render new style.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/element.js
          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 .
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          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.
          Adnan Durrani made changes -
          Attachment ICE-4461.war [ 11722 ]
          Hide
          Adnan Durrani added a comment -

          enhanced testcase

          Show
          Adnan Durrani added a comment - enhanced testcase
          Adnan Durrani made changes -
          Attachment ICE-4461.war [ 11734 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18871 Tue May 12 16:08:57 MDT 2009 mircea.toma ICE-4461 Update the style attribute so that the decision to update the style will continue to be valid.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/element.js
          Ken Fyten made changes -
          Link This issue blocks ICE-4497 [ ICE-4497 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P1

            People

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

              Dates

              • Created:
                Updated:
                Resolved: