ICEfaces
  1. ICEfaces
  2. ICE-8439

icecore:singleSubmit - sends updates when tabbing/clicking out of an input text field in IE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: EE-3.0.0.GA_P01, 3.2
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      IE8, IE9 Compat Mode

      Description

      When using the icecore:singleSubmit tag on a form, clicking or tabbing out of the input fields is causing and update to be sent. This is only in IE8 or IE9 Compat mode. The values in the input fields are not changed either.

      I've tested this with both the ice:inputText and h:inputText components.

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case that shows issue.

        Steps:

        • Load welcomeICEfaces.jsf in IE8 or IE9 Compat Mode.
        • In the IE9 dev tools you can capture the Network traffic.
        • Click between the two input fields. Updates should be displayed in the Network traffic.
        • If running in IE9 mode, these updates are not seen.
        Show
        Arran Mccullough added a comment - Attached test case that shows issue. Steps: Load welcomeICEfaces.jsf in IE8 or IE9 Compat Mode. In the IE9 dev tools you can capture the Network traffic. Click between the two input fields. Updates should be displayed in the Network traffic. If running in IE9 mode, these updates are not seen.
        Hide
        Ted Goddard added a comment -

        They may want to use submitOnBlur="false":

        http://wiki.icesoft.org/display/ICE/Single+Submit

        Otherwise, this comes down to a browser difference.

        Show
        Ted Goddard added a comment - They may want to use submitOnBlur="false": http://wiki.icesoft.org/display/ICE/Single+Submit Otherwise, this comes down to a browser difference.
        Hide
        Arran Mccullough added a comment -

        Using submitOnBlur="false" has no change, this is the default I believe too. The updates are occurring when no value has changed in the input field.

        Show
        Arran Mccullough added a comment - Using submitOnBlur="false" has no change, this is the default I believe too. The updates are occurring when no value has changed in the input field.
        Hide
        Deryk Sinotte added a comment -

        In application.js, we define the enableSingleSubmit function and inside, override submitForm. Part of the logic in there is to check various events and such to see whether we should avoid submission. One of those checks looks like this:

        var isText = ( (elementType == "text") ||
        (elementType == "password") ||
        (elementType == "textarea") );
        if (isText) {
        if ((eType == "click") || ((!useBlur) && (eType == "blur")))

        { //click events should not trigger text box submit //blur events are mostly redundant with change events return; }

        }

        Basically, if it's a text type field and the event is a click (or a blur, and by default this is false), then we simply return and avoid doing the form submission.

        However in older versions of IE, the event is not "blur". Instead the eType is "focusout". So we need to add a check for that.

        if ((eType == "click") || ((!useBlur) && ((eType == "blur") || eType == "focusout"))) {

        Tested and committed changes to the branch and trunk.

        Show
        Deryk Sinotte added a comment - In application.js, we define the enableSingleSubmit function and inside, override submitForm. Part of the logic in there is to check various events and such to see whether we should avoid submission. One of those checks looks like this: var isText = ( (elementType == "text") || (elementType == "password") || (elementType == "textarea") ); if (isText) { if ((eType == "click") || ((!useBlur) && (eType == "blur"))) { //click events should not trigger text box submit //blur events are mostly redundant with change events return; } } Basically, if it's a text type field and the event is a click (or a blur, and by default this is false), then we simply return and avoid doing the form submission. However in older versions of IE, the event is not "blur". Instead the eType is "focusout". So we need to add a check for that. if ((eType == "click") || ((!useBlur) && ((eType == "blur") || eType == "focusout"))) { Tested and committed changes to the branch and trunk.

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: