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

        Arran Mccullough created issue -
        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.
        Arran Mccullough made changes -
        Field Original Value New Value
        Attachment Case11506Example2.war [ 14779 ]
        Attachment Case11506Example2.zip [ 14780 ]
        Arran Mccullough made changes -
        Salesforce Case []
        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.

        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.

        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.
        Arran Mccullough made changes -
        Salesforce Case [5007000000NI1k8]
        Ken Fyten made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Arran Mccullough made changes -
        Resolution Won't Fix [ 2 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Assignee Ken Fyten [ ken.fyten ]
        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.
        Ken Fyten made changes -
        Fix Version/s EE-3.0.0.GA_P01 [ 10327 ]
        Fix Version/s 3.2 [ 10338 ]
        Assignee Priority P1
        Assignee Ken Fyten [ ken.fyten ] Deryk Sinotte [ deryk.sinotte ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30542 Thu Aug 16 17:13:40 MDT 2012 deryk.sinotte ICE-8439: include check for "focusout" to support older IE versions when avoiding single submits from text elements
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/javascript/application.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30543 Thu Aug 16 17:14:00 MDT 2012 deryk.sinotte ICE-8439: include check for "focusout" to support older IE versions when avoiding single submits from text elements
        Files Changed
        Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/core/src/main/javascript/application.js
        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.
        Deryk Sinotte made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1 [ 10010 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: