ICEfaces
  1. ICEfaces
  2. ICE-8240

Clicking enter key in an ice:inputText field causes two submits to occur

    Details

      Description

      When the enter key is pressed in an ice:inputText field, two submits are sent to the server. In addition to this there is an ice:selectInputDate component on the page. When the enter key is pressed the date popup is opened.

      This is not an issue with the ICEfaces EE 1.8.2 P03 release.

        Activity

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

        Attaced test case that reproduces the issue.

        Steps:

        • Load welcomeICEfaces.iface
        • Focus into the input field and hit the enter key.
        • In the console logs two updates are seen and the selectInputDate popup is shown.
        Show
        Arran Mccullough added a comment - Attaced test case that reproduces the issue. Steps: Load welcomeICEfaces.iface Focus into the input field and hit the enter key. In the console logs two updates are seen and the selectInputDate popup is shown.
        Arran Mccullough made changes -
        Field Original Value New Value
        Attachment Case11345Example.war [ 14560 ]
        Attachment Case11345Example.zip [ 14561 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s EE-1.8.2.GA_P05 [ 10331 ]
        Assignee Priority P1
        Assignee Arturo Zambrano [ artzambrano ]
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Arturo Zambrano [ artzambrano ] Mircea Toma [ mircea.toma ]
        Arran Mccullough made changes -
        Salesforce Case [5007000000MHrE4]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #29800 Wed Jul 04 10:01:24 MDT 2012 mircea.toma ICE-8240 Cancel the default action during the keypress event to prevent the 'click' event from being sintetically generated during the form submission triggered by the enter key.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/InputTextRenderer.java
        Hide
        Mircea Toma added a comment -

        Indeed the changes for ICE-7186 created this regression. The 'key press' event had its default action canceled when iceSubmit was invoked. Once the iceSubmit call was moved to the 'onkeyup' handler the default action is not canceled anymore.

        The applied fix changes the renderer to write out the 'onkeypress' handler that will cancels the default action during the key press event. This will prevent the 'click' event from being sintetically generated during the form submission triggered by the enter key.

        Show
        Mircea Toma added a comment - Indeed the changes for ICE-7186 created this regression. The 'key press' event had its default action canceled when iceSubmit was invoked. Once the iceSubmit call was moved to the 'onkeyup' handler the default action is not canceled anymore. The applied fix changes the renderer to write out the 'onkeypress' handler that will cancels the default action during the key press event. This will prevent the 'click' event from being sintetically generated during the form submission triggered by the enter key.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Arran Mccullough made changes -
        Salesforce Case [5007000000MHrE4] [5007000000MHrE4, 5007000000NI0pi]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30348 Wed Aug 01 08:17:27 MDT 2012 mircea.toma ICE-8240 Lookup view state element by its name, only when it fails try searching it among the form elements.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/javascript/application.js
        Arran Mccullough made changes -
        Attachment Case11345Example.war [ 14560 ]
        Arran Mccullough made changes -
        Attachment Case11345Example.zip [ 14561 ]
        Hide
        Arran Mccullough added a comment -

        The changes made are preventing any inputs into the ice:inputText component.

        Show
        Arran Mccullough added a comment - The changes made are preventing any inputs into the ice:inputText component.
        Arran Mccullough made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Arran Mccullough added a comment -

        Attached test case that demonstrates the recent issue. Typing into an inputText field does nothing.

        Show
        Arran Mccullough added a comment - Attached test case that demonstrates the recent issue. Typing into an inputText field does nothing.
        Arran Mccullough made changes -
        Attachment Case11504Example.war [ 14769 ]
        Attachment Case11504Example.zip [ 14770 ]
        Hide
        Arran Mccullough added a comment -

        Another customer is also seeing this issue in ICEfaces EE 3.0.0, if the fixes for this could be made to the 3.x branch/trunk also.

        Show
        Arran Mccullough added a comment - Another customer is also seeing this issue in ICEfaces EE 3.0.0, if the fixes for this could be made to the 3.x branch/trunk also.
        Ken Fyten made changes -
        Fix Version/s EE-3.0.0.GA_P01 [ 10327 ]
        Fix Version/s 3.2 [ 10338 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30484 Tue Aug 14 05:24:03 MDT 2012 mircea.toma ICE-8240 Cancel default action only when Enter key is pressed.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/InputTextRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30485 Tue Aug 14 05:29:24 MDT 2012 mircea.toma ICE-8240 Cancel default action only when Enter key is pressed.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/InputTextRenderer.java
        Hide
        Mircea Toma added a comment -

        The latest fix makes sure to cancel default action only when Enter key is pressed.

        Show
        Mircea Toma added a comment - The latest fix makes sure to cancel default action only when Enter key is pressed.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30488 Tue Aug 14 12:18:28 MDT 2012 mircea.toma ICE-8240 Cancel default action only when Enter key is pressed.
        Files Changed
        Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/InputTextRenderer.java
        Hide
        Mircea Toma added a comment -

        Applied fix to maintenance branch as well.

        Show
        Mircea Toma added a comment - Applied fix to maintenance branch as well.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30521 Thu Aug 16 10:47:27 MDT 2012 mircea.toma ICE-8470 Introduced ice.cancelEnterKeyEvent public function that use by InputTextRenderer to cancel the keypress events in ICEfaces3. This is a follow up fix for ICE-8240, unlike ICEfaces 1.8 the event functions are publicly exposed hence the JS error seen previously.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/javascript/compat.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/build.javascript.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/InputTextRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30522 Thu Aug 16 10:47:38 MDT 2012 mircea.toma ICE-8470 Introduced ice.cancelEnterKeyEvent public function that use by InputTextRenderer to cancel the keypress events in ICEfaces3. This is a follow up fix for ICE-8240, unlike ICEfaces 1.8 the event functions are publicly exposed hence the JS error seen previously.
        Files Changed
        Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/compat/core/build.javascript.xml
        Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/compat/core/src/main/javascript/compat.js
        Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/InputTextRenderer.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1 [ 10010 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: