Details
-
Type: Bug
-
Status: Closed
-
Priority: 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.
I've tested this with both the ice:inputText and h:inputText components.
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") ||
{ //click events should not trigger text box submit //blur events are mostly redundant with change events return; }(elementType == "password") ||
(elementType == "textarea") );
if (isText) {
if ((eType == "click") || ((!useBlur) && (eType == "blur")))
}
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.