Skip to content
Browse files

Custom select: Get rid of hasAttribute. Fixes #5506. Thanks erikyuzwa.

1 parent 5c5e3e5 commit b3c6659f97a5d8031fa9c4637c38874965f596c6 @gabrielschulhof gabrielschulhof committed Jan 23, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/widgets/forms/select.custom.js
View
4 js/widgets/forms/select.custom.js
@@ -105,7 +105,7 @@ define( [
self.refresh();
if ( self._origTabIndex === undefined ) {
- self._origTabIndex = self.select[ 0 ].hasAttribute( "tabindex" ) ? self.select.attr( "tabindex" ) : undefined;
+ self._origTabIndex = ( self.select[ 0 ].getAttribute( "tabindex" ) === null ) ? undefined : self.select.attr( "tabindex" );
// Map undefined to false, because self._origTabIndex === undefined
// indicates that we have not yet checked whether the select has
// originally had a tabindex attribute, whereas false indicates that
@@ -466,7 +466,7 @@ define( [
// If we have identified a placeholder, record the fact that it was
// us who have added the placeholder to the option and mark it
// retroactively in the select as well
- if ( !option.hasAttribute( dataPlaceholderAttr ) ) {
+ if ( null === option.getAttribute( dataPlaceholderAttr ) ) {
this._removePlaceholderAttr = true;
}
option.setAttribute( dataPlaceholderAttr, true );

0 comments on commit b3c6659

Please sign in to comment.
Something went wrong with that request. Please try again.