]> source.dussan.org Git - jquery.git/commitdiff
2.0: Remove support.optSelected
authorTimmy Willison <timmywillisn@gmail.com>
Mon, 17 Dec 2012 23:15:51 +0000 (18:15 -0500)
committerRick Waldron <waldron.rick@gmail.com>
Mon, 31 Dec 2012 18:20:24 +0000 (13:20 -0500)
src/attributes.js
src/support.js

index 8e193488878686a013b7662db615d705af825825..f9475236835e2d3b19ae005dfa46727436e9fadb 100644 (file)
@@ -610,26 +610,6 @@ if ( !jQuery.support.style ) {
        };
 }
 
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
-       jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
-               get: function( elem ) {
-                       var parent = elem.parentNode;
-
-                       if ( parent ) {
-                               parent.selectedIndex;
-
-                               // Make sure that it also works with optgroups, see #5701
-                               if ( parent.parentNode ) {
-                                       parent.parentNode.selectedIndex;
-                               }
-                       }
-                       return null;
-               }
-       });
-}
-
 // Radios and checkboxes getter/setter
 if ( !jQuery.support.checkOn ) {
        jQuery.each([ "radio", "checkbox" ], function() {
index d4e4ea3dae99339d71abcba99496875c24bac6ff..d1a8d3d3821d936ef6cfeef6a7bca35852ce5040 100644 (file)
@@ -55,10 +55,6 @@ jQuery.support = (function() {
                // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
                checkOn: !!input.value,
 
-               // Make sure that a selected-by-default option has a working selected property.
-               // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
-               optSelected: opt.selected,
-
                // Makes sure cloning an html5 element does not cause problems
                // Where outerHTML is undefined, this still works
                html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",