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

        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.
        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.
        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.
        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.
        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.
        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.
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: