Skip to content

Commit ead83b9

Browse files
adrianolekmgol
authored andcommitted
Event: Use form prop so that a propHook can be used
Fixes gh-2332 Closes gh-2575
1 parent 4c3e63b commit ead83b9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/event.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,12 @@ if ( !support.submit ) {
922922
// Node name check avoids a VML-related crash in IE (#9807)
923923
var elem = e.target,
924924
form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ?
925-
elem.form :
925+
926+
// Support: IE <=8
927+
// We use jQuery.prop instead of elem.form
928+
// to allow fixing the IE8 delegated submit issue (gh-2332)
929+
// by 3rd party polyfills/workarounds.
930+
jQuery.prop( elem, "form" ) :
926931
undefined;
927932

928933
if ( form && !jQuery._data( form, "submit" ) ) {

0 commit comments

Comments
 (0)