mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Event: Use form prop so that a propHook can be used
Fixes gh-2332 Closes gh-2575
This commit is contained in:
parent
4c3e63b47c
commit
ead83b9c8a
@ -922,7 +922,12 @@ if ( !support.submit ) {
|
|||||||
// Node name check avoids a VML-related crash in IE (#9807)
|
// Node name check avoids a VML-related crash in IE (#9807)
|
||||||
var elem = e.target,
|
var elem = e.target,
|
||||||
form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ?
|
form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ?
|
||||||
elem.form :
|
|
||||||
|
// Support: IE <=8
|
||||||
|
// We use jQuery.prop instead of elem.form
|
||||||
|
// to allow fixing the IE8 delegated submit issue (gh-2332)
|
||||||
|
// by 3rd party polyfills/workarounds.
|
||||||
|
jQuery.prop( elem, "form" ) :
|
||||||
undefined;
|
undefined;
|
||||||
|
|
||||||
if ( form && !jQuery._data( form, "submit" ) ) {
|
if ( form && !jQuery._data( form, "submit" ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user