ICEfaces
  1. ICEfaces
  2. ICE-7083

onfocus onclick sequence issue with auto ajax

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.1-Beta, 3.0, EE-2.0.0.GA_P01
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      ICEfaces 2
    • Assignee Priority:
      P1

      Description

      Set the focus on an input component, and then click on a submit h:commandButton that ICEfaces has auto AJAXified. Notice how the focus goes back to the input component, and the bridge focus management thinks that the input component should have focus when one would think the h:commandButton should have focus. This only happens on some browsers and not others.

      ICE-7074 goes into detail explaining the issue. For that customer we used a workaround to side-step the problem, but that won't do for every customer.

      Of particular interest, Brad mentions this doesn't happen with an h:commandButton with an f:ajax tag, so maybe something different happens.

        Activity

        Mark Collette created issue -
        Mark Collette made changes -
        Field Original Value New Value
        Salesforce Case []
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Deryk Sinotte made changes -
        Salesforce Case []
        Assignee Priority P3
        Assignee Deryk Sinotte [ deryk.sinotte ] Mircea Toma [ mircea.toma ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s EE-2.0.0.GA_P01 [ 10271 ]
        Fix Version/s 2.1 [ 10241 ]
        Assignee Priority P3 P1
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25163 Wed Aug 03 14:13:52 MDT 2011 mircea.toma ICE-7083 Record focus for the clicked element to make sure that the focus retention works well even in browsers that fire the 'click' event before the 'focus' event.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/javascript/focus.js
        Hide
        Mircea Toma added a comment -

        The solution adopted was to record the focus for the element that was clicked to make sure that the focus retention works well even in browsers that fire the 'click' event before the 'focus' event. The implementation uses the bridge focus retention infrastructure to register on the focusable elements 'onclick' callbacks (along with the 'onfocus' callbacks) to save the focused element ID.

        Show
        Mircea Toma added a comment - The solution adopted was to record the focus for the element that was clicked to make sure that the focus retention works well even in browsers that fire the 'click' event before the 'focus' event. The implementation uses the bridge focus retention infrastructure to register on the focusable elements 'onclick' callbacks (along with the 'onfocus' callbacks) to save the focused element ID.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25194 Thu Aug 04 16:09:19 MDT 2011 mircea.toma ICE-7083 Rollback changes since it causes "MASSIVE FAILURES".
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/javascript/focus.js
        Mircea Toma made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25236 Thu Aug 11 04:44:29 MDT 2011 mircea.toma ICE-7083 Apply focus only when the current focus differs from the one received in the update.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/javascript/focus.js
        Hide
        Mircea Toma added a comment -

        The solution described above generated lots of regressions. The commit was rolled back.

        Show
        Mircea Toma added a comment - The solution described above generated lots of regressions. The commit was rolled back.
        Hide
        Mircea Toma added a comment -

        The solution chosen that hopefully won't generate any regressions was to apply the focus to elements that differ from the element owning the focus.

        Show
        Mircea Toma added a comment - The solution chosen that hopefully won't generate any regressions was to apply the focus to elements that differ from the element owning the focus.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 2.1-Beta [ 10291 ]
        Fix Version/s 2.1 [ 10241 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 3.0 [ 10241 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: