ICEfaces
  1. ICEfaces
  2. ICE-10668

ace:dataTable - filterEvent="enter" focus IE issue

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P02, EE-4.0.0.GA
    • Fix Version/s: EE-3.3.0.GA_P03, 4.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      IE

      Description

      When using the enter key event for the ace:dataTable filtering, focus is being set to an outside component instead of kept to the filter field.

      This happens in IE browsers only.
      1. Case13407Example.zip
        21 kB
        Arran Mccullough

        Activity

        Arran Mccullough created issue -
        Hide
        Arran Mccullough added a comment -

        Attached test case that shows the issue.

        Steps:

        • Load welcomeICEfaces.jsf
        • In the filter field enter a '1' and press the enter key.
        • There is an ace:ajax tag set for the filter event which will show what component is active for onStart, onSuccess, and OnComplete
        • The onStart shows the filter field has focus.
        • Then the onSuccess and onComplete show focus set to a button outside of the table.
        Show
        Arran Mccullough added a comment - Attached test case that shows the issue. Steps: Load welcomeICEfaces.jsf In the filter field enter a '1' and press the enter key. There is an ace:ajax tag set for the filter event which will show what component is active for onStart, onSuccess, and OnComplete The onStart shows the filter field has focus. Then the onSuccess and onComplete show focus set to a button outside of the table.
        Arran Mccullough made changes -
        Field Original Value New Value
        Attachment Case13407Example.war [ 19480 ]
        Attachment Case13407Example.zip [ 19481 ]
        Hide
        Arran Mccullough added a comment -

        Note when testing with the most recent EE 3.3.0 branch, I am not able to see the onSuccess and onComplete events being fired in IE.

        Show
        Arran Mccullough added a comment - Note when testing with the most recent EE 3.3.0 branch, I am not able to see the onSuccess and onComplete events being fired in IE.
        Ken Fyten made changes -
        Fix Version/s EE-3.3.0.GA_P03 [ 11572 ]
        Fix Version/s 4.1 [ 11375 ]
        Ken Fyten made changes -
        Assignee Mircea Toma [ mircea.toma ]
        Assignee Priority P2 [ 10011 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44654 Thu May 07 13:10:32 MDT 2015 mircea.toma ICE-10668 Cancel default action when 'Enter' key is pressed to avoid having form submitted by ICEfaces' form capturing feature (the filtering input has its own submitting callback). Also registered the filtering callback on 'keydown' instead of 'keypress' to capture the 'Enter' key in IE (keypress callback is not invoked on Enter keypress).
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/datatable/datatable.js
        Hide
        Mircea Toma added a comment -

        Cancel default action when Enter key is pressed to avoid having form submitted by ICEfaces' form capturing feature (the filtering input has its own submitting callback). Also registered the filtering callback on keydown instead of keypress to capture the Enter key in IE (keypress callback is not invoked on Enter keypress).

        Show
        Mircea Toma added a comment - Cancel default action when Enter key is pressed to avoid having form submitted by ICEfaces' form capturing feature (the filtering input has its own submitting callback). Also registered the filtering callback on keydown instead of keypress to capture the Enter key in IE (keypress callback is not invoked on Enter keypress).
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Liana Munroe added a comment -

        Tested with ICEfaces 4 trunk r44662. Focus is still moving to button.

        Tested with ICEfaces EE-3.3.0_P03 tag and maintenance branch r44662.
        IE 11 - Focus stays in the filter input but the onSuccess and onComplete events are not being fired. Also the focus moves back to the button when testing this same scenario with FF and Chrome.

        Show
        Liana Munroe added a comment - Tested with ICEfaces 4 trunk r44662. Focus is still moving to button. Tested with ICEfaces EE-3.3.0_P03 tag and maintenance branch r44662. IE 11 - Focus stays in the filter input but the onSuccess and onComplete events are not being fired. Also the focus moves back to the button when testing this same scenario with FF and Chrome.
        Hide
        Ken Fyten added a comment -

        Re-opened as per QA's noted regressions, also the onComplete and onSuccess issue needs attention.

        Show
        Ken Fyten added a comment - Re-opened as per QA's noted regressions, also the onComplete and onSuccess issue needs attention.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Assignee Priority P2 [ 10011 ] P1 [ 10010 ]
        Hide
        Mircea Toma added a comment -

        Added modified test case file with callbacks that do not throw exceptions.

        Show
        Mircea Toma added a comment - Added modified test case file with callbacks that do not throw exceptions.
        Mircea Toma made changes -
        Attachment Case13407Example.zip [ 19489 ]
        Attachment Case13407Example.war [ 19490 ]
        Hide
        Mircea Toma added a comment -

        The onSuccess and onComplete callbacks will be fired since they do not trigger errors when document.activeElement is not defined in some browsers.

        Show
        Mircea Toma added a comment - The onSuccess and onComplete callbacks will be fired since they do not trigger errors when document.activeElement is not defined in some browsers.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Liana Munroe added a comment -

        Tested with ICEfaces 4 trunk r44662 and modified test case.
        When using Chrome and FF the focus is still being placed on the Button after entering input and pressing Enter.
        Tested with ICEfaces EE-3.3.0.GA_P03 tag and maintenance branch r44666. Focus is retained within the text input.

        In all cases the filter event is no longer firing in the modified test app.

        Show
        Liana Munroe added a comment - Tested with ICEfaces 4 trunk r44662 and modified test case. When using Chrome and FF the focus is still being placed on the Button after entering input and pressing Enter. Tested with ICEfaces EE-3.3.0.GA_P03 tag and maintenance branch r44666. Focus is retained within the text input. In all cases the filter event is no longer firing in the modified test app.
        Hide
        Ken Fyten added a comment -

        Re-opened for issues reported in the comment above.

        Show
        Ken Fyten added a comment - Re-opened for issues reported in the comment above.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Mircea Toma made changes -
        Attachment Case13407Example.war [ 19490 ]
        Mircea Toma made changes -
        Attachment Case13407Example.zip [ 19489 ]
        Hide
        Mircea Toma added a comment -

        Updated attached test files. One of the callbacks was missing a parenthesis which triggered a JS error.

        Show
        Mircea Toma added a comment - Updated attached test files. One of the callbacks was missing a parenthesis which triggered a JS error.
        Mircea Toma made changes -
        Attachment Case13407Example.war [ 19582 ]
        Attachment Case13407Example.zip [ 19583 ]
        Hide
        Mircea Toma added a comment -

        Ported forward the fix for ICE-10658 to trigger the events in the expected order.

        Show
        Mircea Toma added a comment - Ported forward the fix for ICE-10658 to trigger the events in the expected order.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Liana Munroe added a comment -

        Tested with ICEfaces 4 trunk r44668, ICEfaces EE-3.3.0.GA_P03 tag r44666 and modified test case.
        When using FF and the testing steps as per the description
        1.)Type 1 into the input and press enter, focus stays in the input. (_iceForm:testTable:colOne_filter)
        2.) Press Enter or dismiss the JS prompt and focus is moved to the button. (_iceForm:testButton)
        3.) Press Enter or dismiss the JS prompt and focus is moved back to the input area. (_iceForm:testTable:colOne_filter)

        When using Chrome and the testing steps as per the description
        1.)Type 1 into the input and press enter, focus stays in the input. (_iceForm:testTable:colOne_filter)
        2.) Press Enter or dismiss the JS prompt and focus becomes undefined. (2_undefined)
        3.) Press Enter or dismiss the JS prompt and focus is moved to the button. (3_undefined)

        When testing with IE 11 the focus appears to start at, and end at the text input, with a dead zone in between. The js prompts are as follows: (_iceForm:testTable:colOne_filter), (2_null), (3_undefined).

        Show
        Liana Munroe added a comment - Tested with ICEfaces 4 trunk r44668, ICEfaces EE-3.3.0.GA_P03 tag r44666 and modified test case. When using FF and the testing steps as per the description 1.)Type 1 into the input and press enter, focus stays in the input. (_iceForm:testTable:colOne_filter) 2.) Press Enter or dismiss the JS prompt and focus is moved to the button. (_iceForm:testButton) 3.) Press Enter or dismiss the JS prompt and focus is moved back to the input area. (_iceForm:testTable:colOne_filter) When using Chrome and the testing steps as per the description 1.)Type 1 into the input and press enter, focus stays in the input. (_iceForm:testTable:colOne_filter) 2.) Press Enter or dismiss the JS prompt and focus becomes undefined. (2_undefined) 3.) Press Enter or dismiss the JS prompt and focus is moved to the button. (3_undefined) When testing with IE 11 the focus appears to start at, and end at the text input, with a dead zone in between. The js prompts are as follows: (_iceForm:testTable:colOne_filter), (2_null), (3_undefined).
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment -

        I don't see FF behaving as described, the focus is kept on the input element at all times. As for Chrome, indeed the focus is set on the window once after the first pop up is closed. Once the messages are logged instead of showing them in popups then Chrome runs just fine, it keeps the focus on the input element.
        In IE11 the second popup will show an undefined value because the DOM update is applied slightly different causing the input element to be out of the DOM temporarily.

        I believe the test should be changed so that the alert popups are replaced with log calls to avoid their interference with focus.

        .....
        <ace:ajax event="filter"
                  onStart="ice.log.debug(ice.log, '1_' + (document.activeElement ? document.activeElement.name : null)); return true;"
                  onSuccess="ice.log.debug(ice.log, '2_' + (document.activeElement ? document.activeElement.name : null));"
                  onComplete="ice.log.debug(ice.log, '3_' + (document.activeElement ? document.activeElement.name : null));"/>
        .....
        
        Show
        Mircea Toma added a comment - I don't see FF behaving as described, the focus is kept on the input element at all times. As for Chrome, indeed the focus is set on the window once after the first pop up is closed. Once the messages are logged instead of showing them in popups then Chrome runs just fine, it keeps the focus on the input element. In IE11 the second popup will show an undefined value because the DOM update is applied slightly different causing the input element to be out of the DOM temporarily. I believe the test should be changed so that the alert popups are replaced with log calls to avoid their interference with focus. ..... <ace:ajax event= "filter" onStart= "ice.log.debug(ice.log, '1_' + (document.activeElement ? document.activeElement.name : null )); return true ;" onSuccess= "ice.log.debug(ice.log, '2_' + (document.activeElement ? document.activeElement.name : null ));" onComplete= "ice.log.debug(ice.log, '3_' + (document.activeElement ? document.activeElement.name : null ));" /> .....
        Hide
        Liana Munroe added a comment -

        Verified using the suggested modification to the test application, ICEfaces EE-3.3.0.GA_p03 tag, ICEfaces 4 trunk r44693. Tomcat 7, IE 11, 10, 9, 8, 7, FF 34, Chrome 42.

        Show
        Liana Munroe added a comment - Verified using the suggested modification to the test application, ICEfaces EE-3.3.0.GA_p03 tag, ICEfaces 4 trunk r44693. Tomcat 7, IE 11, 10, 9, 8, 7, FF 34, Chrome 42.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Liana Munroe added a comment -

        Verified using the suggested modification to the test application, ICEfaces EE-3.3.0.GA_p03 Jenkins Build 07, Tomcat 7, IE 11, 10, 9, 8, 7, FF 34, Chrome 42

        Show
        Liana Munroe added a comment - Verified using the suggested modification to the test application, ICEfaces EE-3.3.0.GA_p03 Jenkins Build 07, Tomcat 7, IE 11, 10, 9, 8, 7, FF 34, Chrome 42
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: