Accessing the 'type' property on VML elements fails on IE. Fixes #7071.
This commit is contained in:
parent
3418f32387
commit
0d8b247cab
3 changed files with 10 additions and 2 deletions
|
@ -800,7 +800,7 @@ if ( !jQuery.support.changeBubbles ) {
|
|||
beforedeactivate: testChange,
|
||||
|
||||
click: function( e ) {
|
||||
var elem = e.target, type = elem.type;
|
||||
var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
|
||||
|
||||
if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
|
||||
testChange.call( this, e );
|
||||
|
@ -810,7 +810,7 @@ if ( !jQuery.support.changeBubbles ) {
|
|||
// Change has to be called before submit
|
||||
// Keydown will be called before keypress, which is used in submit-event delegation
|
||||
keydown: function( e ) {
|
||||
var elem = e.target, type = elem.type;
|
||||
var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
|
||||
|
||||
if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
|
||||
(e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue