@vaadin/field-base 23.0.4 → 23.1.0-alpha2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/field-base",
3
- "version": "23.0.4",
3
+ "version": "23.1.0-alpha2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "@open-wc/dedupe-mixin": "^1.3.0",
34
34
  "@polymer/polymer": "^3.0.0",
35
- "@vaadin/component-base": "^23.0.4",
35
+ "@vaadin/component-base": "23.1.0-alpha2",
36
36
  "lit": "^2.0.0"
37
37
  },
38
38
  "devDependencies": {
@@ -40,5 +40,5 @@
40
40
  "@vaadin/testing-helpers": "^0.3.2",
41
41
  "sinon": "^9.2.1"
42
42
  },
43
- "gitHead": "d8db2046661c42fb5aac09ed683b500bf4613b26"
43
+ "gitHead": "6842dcb8b163d4512fae8d3d12a6559077a4aee6"
44
44
  }
@@ -33,6 +33,8 @@ export const DelegateFocusMixin = dedupingMixin(
33
33
  * Any component implementing this mixin is expected to provide it
34
34
  * by using `this._setFocusElement(input)` Polymer API.
35
35
  *
36
+ * Toggling `tabindex` attribute on the host element propagates its value to `focusElement`.
37
+ *
36
38
  * @protected
37
39
  * @type {!HTMLElement}
38
40
  */
@@ -43,16 +45,15 @@ export const DelegateFocusMixin = dedupingMixin(
43
45
  },
44
46
 
45
47
  /**
46
- * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.
47
- *
48
- * By default, the host element does not have tabindex attribute. Instead, `focusElement` should have it.
49
- * Toggling `tabindex` attribute on the host element propagates its value to `focusElement`.
48
+ * Override the property from `TabIndexMixin`
49
+ * to ensure the `tabindex` attribute of the focus element
50
+ * will be restored to `0` after re-enabling the element.
50
51
  *
51
52
  * @protected
53
+ * @override
52
54
  */
53
- tabindex: {
54
- type: Number,
55
- value: undefined
55
+ _lastTabIndex: {
56
+ value: 0
56
57
  }
57
58
  };
58
59
  }
@@ -218,7 +219,7 @@ export const DelegateFocusMixin = dedupingMixin(
218
219
  if (this.disabled && tabindex) {
219
220
  // If tabindex attribute was changed while component was disabled
220
221
  if (tabindex !== -1) {
221
- this.__lastTabIndex = tabindex;
222
+ this._lastTabIndex = tabindex;
222
223
  }
223
224
  this.tabindex = undefined;
224
225
  }
@@ -20,6 +20,7 @@ export const ShadowFocusMixin = (superClass) =>
20
20
  /**
21
21
  * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.
22
22
  *
23
+ * @override
23
24
  * @protected
24
25
  */
25
26
  tabindex: {
@@ -88,7 +89,7 @@ export const ShadowFocusMixin = (superClass) =>
88
89
  if (this.disabled && tabindex) {
89
90
  // If tabindex attribute was changed while component was disabled
90
91
  if (tabindex !== -1) {
91
- this.__lastTabIndex = tabindex;
92
+ this._lastTabIndex = tabindex;
92
93
  }
93
94
  this.tabindex = undefined;
94
95
  }