sventon subversion web client - http://www.sventon.org
[show recent changes]
 
  Help
HEAD
Rev: 24738 - http://anonsvn.icesoft.org/repo / icefaces2 / scratchpads / patches / sf-10125 / icefaces / core / src / main / javascript / application.js
Unified Diff View - application.js
/icefaces2/scratchpads/patches/sf-10125/icefaces/core/src/main/javascript/application.js @ revision 24737
/icefaces2/scratchpads/patches/sf-10125/icefaces/core/src/main/javascript/application.js @ revision 24738
@@ -306,6 +306,10 @@                 } else {                     eType = ev.type;                 } +    if (0 == eType.indexOf("on")) { +                    //strip "on" from front of event name +                    eType = eType.substr(2); +                }                 var e = $event(ev, f);                 var element = triggeredBy(e); @@ -325,9 +329,12 @@                 var isText = ( (elementType == "text") ||                         (elementType == "password") ||                         (elementType == "textarea") ); -                if (isText && (eType == "click")) { -                    //click events should not trigger text box submit -                    return; +                if (isText) { +                    if ((eType == "click") || (eType == "blur")) { +                        //click events should not trigger text box submit +                        //blur events are mostly redundant with change events +                        return; +                    }                 }                 if ("select-one" == elementType) { @@ -344,9 +351,11 @@             }             if (f.addEventListener) { +    //events for most browsers                 f.addEventListener('blur', submitForm, true);                 f.addEventListener('change', submitForm, true);             } else { +    //events for IE                 f.attachEvent('onfocusout', submitForm);                 f.attachEvent('onclick', submitForm);             }


feed icon

sventon 2.5.1