Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 0c0726c

Browse files
author
Gabriel Schulhof
committed
[custom select] Older versions of jQuery report 0 for .attr( "tabindex" ) if the attribute is absent. Check for its presence first.
1 parent cb4051d commit 0c0726c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/widgets/forms/select.custom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ define( [
9999
self.refresh();
100100

101101
if ( self._origTabIndex === undefined ) {
102-
self._origTabIndex = self.select.attr( "tabindex" );
102+
self._origTabIndex = self.select[ 0 ].hasAttribute( "tabindex" ) ? self.select.attr( "tabindex" ) : undefined;
103103
// Map undefined to false, because self._origTabIndex === undefined
104104
// indicates that we have not yet checked whether the select has
105105
// originally had a tabindex attribute, whereas false indicates that

0 commit comments

Comments
 (0)