Event: Use form prop so that a propHook can be used

Fixes gh-2332
Closes gh-2575
This commit is contained in:
Adrian Olek 2015-08-12 15:20:11 +02:00 committed by Michał Gołębiowski
parent 4c3e63b47c
commit ead83b9c8a

View File

@ -922,7 +922,12 @@ if ( !support.submit ) {
// Node name check avoids a VML-related crash in IE (#9807)
var elem = e.target,
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;
if ( form && !jQuery._data( form, "submit" ) ) {