@polymer/iron-behaviors
Advanced tools
Comparing version 3.0.0-pre.10 to 3.0.0-pre.11
@@ -1,5 +0,6 @@ | ||
import { html } from '../../polymer/polymer.js'; | ||
import '../../polymer/polymer.js'; | ||
import { IronButtonState } from '../iron-button-state.js'; | ||
import { IronControlState } from '../iron-control-state.js'; | ||
import { Polymer } from '../../polymer/lib/legacy/polymer-fn.js'; | ||
import { html } from '../../polymer/lib/utils/html-tag.js'; | ||
@@ -6,0 +7,0 @@ /** |
@@ -31,4 +31,9 @@ import '../polymer/polymer.js'; | ||
/** | ||
* Value of the `tabindex` attribute before `disabled` was activated. | ||
* `null` means the attribute was not present. | ||
* @type {?string|undefined} | ||
*/ | ||
_oldTabIndex: { | ||
type: Number | ||
type: String | ||
}, | ||
@@ -93,3 +98,7 @@ | ||
if (disabled) { | ||
this._oldTabIndex = this.tabIndex; | ||
// Read the `tabindex` attribute instead of the `tabIndex` property. | ||
// The property returns `-1` if there is no `tabindex` attribute. | ||
// This distinction is important when restoring the value because | ||
// leaving `-1` hides shadow root children from the tab order. | ||
this._oldTabIndex = this.getAttribute('tabindex'); | ||
this._setFocused(false); | ||
@@ -99,3 +108,7 @@ this.tabIndex = -1; | ||
} else if (this._oldTabIndex !== undefined) { | ||
this.tabIndex = this._oldTabIndex; | ||
if (this._oldTabIndex === null) { | ||
this.removeAttribute('tabindex'); | ||
} else { | ||
this.setAttribute('tabindex', this._oldTabIndex); | ||
} | ||
} | ||
@@ -102,0 +115,0 @@ }, |
{ | ||
"name": "@polymer/iron-behaviors", | ||
"flat": true, | ||
"version": "3.0.0-pre.10", | ||
"description": "Provides a set of behaviors for the iron elements", | ||
"contributors": [ | ||
"The Polymer Authors" | ||
], | ||
"repository": { | ||
@@ -13,8 +7,7 @@ "type": "git", | ||
}, | ||
"name": "@polymer/iron-behaviors", | ||
"license": "BSD-3-Clause", | ||
"dependencies": { | ||
"@polymer/polymer": "^3.0.0-pre.10", | ||
"@polymer/iron-a11y-keys-behavior": "^3.0.0-pre.10" | ||
}, | ||
"devDependencies": { | ||
"@polymer/gen-typescript-declarations": "^1.2.0", | ||
"bower": "^1.8.0", | ||
"@polymer/paper-styles": "^3.0.0-pre.10", | ||
@@ -27,2 +20,6 @@ "@polymer/paper-input": "^3.0.0-pre.10", | ||
}, | ||
"scripts": { | ||
"update-types": "bower install && gen-typescript-declarations --deleteExisting --outDir ." | ||
}, | ||
"version": "3.0.0-pre.11", | ||
"resolutions": { | ||
@@ -33,3 +30,8 @@ "inherits": "2.0.3", | ||
"type-detect": "1.0.0" | ||
}, | ||
"author": "The Polymer Authors", | ||
"dependencies": { | ||
"@polymer/polymer": "^3.0.0-pre.10", | ||
"@polymer/iron-a11y-keys-behavior": "^3.0.0-pre.10" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40576
16
8
399