File tree Expand file tree Collapse file tree 1 file changed +11
-15
lines changed
Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ define( [
55 "../selector"
66] , function ( jQuery , access , support ) {
77
8- var rfocusable = / ^ (?: i n p u t | s e l e c t | t e x t a r e a | b u t t o n ) $ / i,
8+ var accessIndex ,
9+ rfocusable = / ^ (?: i n p u t | s e l e c t | t e x t a r e a | b u t t o n ) $ / i,
910 rclickable = / ^ (?: a | a r e a ) $ / i;
1011
1112jQuery . fn . extend ( {
@@ -86,25 +87,20 @@ jQuery.extend( {
8687// The getter ensures a default option is selected
8788// when in an optgroup
8889if ( ! support . optSelected ) {
89- jQuery . propHooks . selected = {
90- get : function ( elem ) {
91- var parent = elem . parentNode ;
90+ accessIndex = function ( elem ) {
91+ var parent = elem . parentNode ;
92+ if ( parent ) {
93+ parent . selectedIndex ;
94+
9295 if ( parent && parent . parentNode ) {
9396 parent . parentNode . selectedIndex ;
9497 }
95- return null ;
96- } ,
97- set : function ( elem ) {
98- var parent = elem . parentNode ;
99- if ( parent ) {
100- parent . selectedIndex ;
101-
102- if ( parent && parent . parentNode ) {
103- parent . parentNode . selectedIndex ;
104- }
105- }
10698 }
10799 } ;
100+ jQuery . propHooks . selected = {
101+ get : accessIndex ,
102+ set : accessIndex
103+ } ;
108104}
109105
110106jQuery . each ( [
You can’t perform that action at this time.
0 commit comments