ICEfaces
  1. ICEfaces
  2. ICE-11376

ace:pushButton does not submit with enter key when it has focus

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-4.2.0.GA, EE-3.3.0.GA_P05
    • Fix Version/s: 4.3, EE-3.3.0.GA_P06
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ace jsf2
    • Support Case References:
      Support Case 14252:-https://icesoft.my.salesforce.com/5000g00001oqHON
    • Workaround Description:
      Hide
      Disable the framework's submitOnEnter feature to allow the component's own listener to handle the request. This is done by setting the 'submitOnEnter' property on the button element itself to 'disabled'. The following markup is an example to do this for all ace:pushButton's on the page:
      <script type="text/javascript">
      ice.ace.jq('.ice-pushbutton button').each(function(){this.submitOnEnter = 'disabled'});
      </script>
      Note that this code has to go at the end of the page, so that no more ace:pushButton components appear after this code on the page.
      Show
      Disable the framework's submitOnEnter feature to allow the component's own listener to handle the request. This is done by setting the 'submitOnEnter' property on the button element itself to 'disabled'. The following markup is an example to do this for all ace:pushButton's on the page: <script type="text/javascript"> ice.ace.jq('.ice-pushbutton button').each(function(){this.submitOnEnter = 'disabled'}); </script> Note that this code has to go at the end of the page, so that no more ace:pushButton components appear after this code on the page.

      Description

      See the attached jsf (only) example to see standard h:commandButton behaviour. When any button on a form has focus and the enter key is pressed, that button submits (and triggers any actionListener methods or action methods). ice:commandButton also behaves this way.
      For some reason, ace:pushButton does not.

      Must also evaluate its impact on icecore:default and when a regular “submit” button is on the form behavior.

        Activity

        Judy Guglielmin created issue -
        Judy Guglielmin made changes -
        Field Original Value New Value
        Assignee Arturo Zambrano [ artzambrano ]
        Judy Guglielmin made changes -
        Fix Version/s 4.3 [ 13096 ]
        Fix Version/s EE-3.3.0.GA_P07 [ 13118 ]
        Arturo Zambrano made changes -
        Workaround Description javascript function for onkeypress when a button has a focus to do ice.s or ice.se. Disable the framework's submitOnEnter feature to allow the component's own listener to handle the request. This is done by setting the 'submitOnEnter' property on the button element itself to 'disabled'. The following markup is an example:
        <script type="text/javascript">
        document.getElementById('form:pushBttnActionList_button').submitOnEnter = 'disabled';
        </script>
        Arturo Zambrano made changes -
        Workaround Description Disable the framework's submitOnEnter feature to allow the component's own listener to handle the request. This is done by setting the 'submitOnEnter' property on the button element itself to 'disabled'. The following markup is an example:
        <script type="text/javascript">
        document.getElementById('form:pushBttnActionList_button').submitOnEnter = 'disabled';
        </script>
        Disable the framework's submitOnEnter feature to allow the component's own listener to handle the request. This is done by setting the 'submitOnEnter' property on the button element itself to 'disabled'. The following markup is an example to do this for all ace:pushButton's on the page:
        <script type="text/javascript">
        ice.ace.jq('.ice-pushbutton button').each(function(){this.submitOnEnter = 'disabled'});
        </script>
        Note that this code has to go at the end of the page, so that no more ace:pushButton components appear after this code on the page.
        Hide
        Arturo Zambrano added a comment -

        r52116, r52117: fix to disable the bridge's submitOnEnter functionality on the ace:pushButton in order to allow the component's listener to be fired when pressing enter on the button (4.0 trunk and 3.3 EE maintenance branch)

        Show
        Arturo Zambrano added a comment - r52116, r52117: fix to disable the bridge's submitOnEnter functionality on the ace:pushButton in order to allow the component's listener to be fired when pressing enter on the button (4.0 trunk and 3.3 EE maintenance branch)
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52116 Thu Nov 30 13:50:38 MST 2017 art.zambrano ICE-11376 fix to disable the bridge's submitOnEnter functionality on the ace:pushButton in order to allow the component's listener to be fired when pressing enter on the button
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/pushbutton/PushButtonRenderer.java
        Hide
        Ken Fyten added a comment -

        The applied fix should only be applied if the button type is "button". If the type is "submit" the original behaviour is desirable.

        Show
        Ken Fyten added a comment - The applied fix should only be applied if the button type is "button". If the type is "submit" the original behaviour is desirable.
        Hide
        Arturo Zambrano added a comment -

        r52120: fix to only disable the bridge's submitOnEnter functionality on the ace:pushButton when this component is of type 'button'; updated TLD documentation (4.0 trunk)

        The 3.3 version of this component doesn't have a 'type' attribute, so this fix was left unchanged in the 3.3 EE maintenance branch.

        Show
        Arturo Zambrano added a comment - r52120: fix to only disable the bridge's submitOnEnter functionality on the ace:pushButton when this component is of type 'button'; updated TLD documentation (4.0 trunk) The 3.3 version of this component doesn't have a 'type' attribute, so this fix was left unchanged in the 3.3 EE maintenance branch.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52120 Thu Nov 30 17:00:10 MST 2017 art.zambrano ICE-11376 fix to only disable the bridge's submitOnEnter functionality on the ace:pushButton when this component is of type 'button'; updated TLD documentation
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/pushbutton/PushButtonMeta.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/pushbutton/PushButtonRenderer.java
        Ken Fyten made changes -
        Fix Version/s EE-3.3.0.GA_P06 [ 13114 ]
        Fix Version/s EE-3.3.0.GA_P07 [ 13118 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Judy Guglielmin
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: