summaryrefslogtreecommitdiffstats
path: root/js/vendor/jquery/src/attributes/prop.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/vendor/jquery/src/attributes/prop.js')
-rw-r--r--js/vendor/jquery/src/attributes/prop.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/vendor/jquery/src/attributes/prop.js b/js/vendor/jquery/src/attributes/prop.js
index da7bc1e86..e127bb08f 100644
--- a/js/vendor/jquery/src/attributes/prop.js
+++ b/js/vendor/jquery/src/attributes/prop.js
@@ -79,6 +79,12 @@ jQuery.extend( {
}
} );
+// Support: IE <=11 only
+// Accessing the selectedIndex property
+// forces the browser to respect setting selected
+// on the option
+// The getter ensures a default option is selected
+// when in an optgroup
if ( !support.optSelected ) {
jQuery.propHooks.selected = {
get: function( elem ) {
@@ -87,6 +93,16 @@ if ( !support.optSelected ) {
parent.parentNode.selectedIndex;
}
return null;
+ },
+ set: function( elem ) {
+ var parent = elem.parentNode;
+ if ( parent ) {
+ parent.selectedIndex;
+
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
}
};
}