ICEfaces
  1. ICEfaces
  2. ICE-6331

Keyboard navigation/submit issues

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta2
    • Fix Version/s: 2.0.0
    • Labels:
      None
    • Environment:
      ICEfaces 2 trunk, rev. # 23297, Firefox & IE browsers. Same issues also present on 2.0 Beta2 release.

      Description

      We are seeing some strange issues related to triggering submits/singleSubmits/partialSubmits with the keyboard/enter key.

      1. Using compat component-showcase, open the panelCollapsible demo in FF browser. Collapse/expand a panel using mouse, all good. Now, tab focus onto one of the panelCollapsible header buttons, then use enter-key to toggle visibility. Submit goes off and never comes back (see busy indicator).

      2. Enter key doesn't seem to properly submit/partialSubmit on some components.

      2a. Using FF (or IE) again, try clicking on the "File" menuitem in the menuBar demo. Now use keyboard arrow keys to navigate focus ind. down to another menuitem, press enter to select it, nothing happens.

      2b. Using the Calendar demo, click on the right arrow button beside the month on the inline calendar. Press Enter, Month changes in bean value, but not in the calendar itself. Pressing Enter again does nothing.

      If you compare this behaviour to the icefaces/trunk showcase, you will see the differences clearly. Note that the public http://component-showcase.icefaces.org/ is running EE P02 code as a reference.

      Could not reproduce these using WebKit browsers, but it is present on IEs and FF, strangely.

        Activity

        Hide
        Mircea Toma added a comment -

        The code triggering the form submit on enter key is executed during keypress for any of the focusable elements with the exception of 'textarea'. But, the anchor elements that execute a submit have additional JS code wired, code that sends additional parameters (for describing the client side state of the component) before making a direct call to iceSubmit/iceSubmitPartial function. The issues described above are caused by the enter key capturing code which triggers the submit before the anchor's code has a chance to submit the form with the additional parameters.

        The fix changed the submit on enter key feature to avoid submitting the form when enter key is pressed on an anchor element (or 'textarea'). This way the anchors rendered by the components will do their own form submit.
        Third party compatibility is improved also since this behavior replicates the native browser behavior of the anchors which do not trigger a form submit on enter since anchors don't belong to a form.

        Show
        Mircea Toma added a comment - The code triggering the form submit on enter key is executed during keypress for any of the focusable elements with the exception of 'textarea'. But, the anchor elements that execute a submit have additional JS code wired, code that sends additional parameters (for describing the client side state of the component) before making a direct call to iceSubmit/iceSubmitPartial function. The issues described above are caused by the enter key capturing code which triggers the submit before the anchor's code has a chance to submit the form with the additional parameters. The fix changed the submit on enter key feature to avoid submitting the form when enter key is pressed on an anchor element (or 'textarea'). This way the anchors rendered by the components will do their own form submit. Third party compatibility is improved also since this behavior replicates the native browser behavior of the anchors which do not trigger a form submit on enter since anchors don't belong to a form.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Ken Fyten
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: