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

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: