Fixed an issue with parentNode being accessed in attr() on disconnected DOM elements.
This commit is contained in:
parent
af1b9994a4
commit
0c97178553
2 changed files with 4 additions and 2 deletions
|
@ -961,7 +961,7 @@ jQuery.extend({
|
|||
|
||||
// Safari mis-reports the default selected property of a hidden option
|
||||
// Accessing the parent's selectedIndex property fixes it
|
||||
if ( name == "selected" )
|
||||
if ( name == "selected" && elem.parentNode )
|
||||
elem.parentNode.selectedIndex;
|
||||
|
||||
// If applicable, access the attribute via the DOM 0 way
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue