@vaadin/component-base 23.0.3 → 23.0.6

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/component-base",
3
- "version": "23.0.3",
3
+ "version": "23.0.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -42,5 +42,5 @@
42
42
  "@vaadin/testing-helpers": "^0.3.2",
43
43
  "sinon": "^9.2.4"
44
44
  },
45
- "gitHead": "3f010a4167c9e04405c9dfab098da0821e02a601"
45
+ "gitHead": "82ca8522e24a63343fb28bcb4c686e55d25c8858"
46
46
  }
@@ -39,7 +39,7 @@ const registered = new Set();
39
39
  export const ElementMixin = (superClass) =>
40
40
  class VaadinElementMixin extends DirMixin(superClass) {
41
41
  static get version() {
42
- return '23.0.3';
42
+ return '23.0.6';
43
43
  }
44
44
 
45
45
  /** @protected */
@@ -9,8 +9,6 @@ import { DisabledMixinClass } from './disabled-mixin.js';
9
9
  /**
10
10
  * A mixin to toggle the `tabindex` attribute.
11
11
  *
12
- * By default, the attribute is set to 0 that makes the element focusable.
13
- *
14
12
  * The attribute is set to -1 whenever the user disables the element
15
13
  * and restored with the last known value once the element is enabled.
16
14
  */
@@ -24,6 +22,11 @@ export declare class TabindexMixinClass {
24
22
  */
25
23
  tabindex: number | undefined | null;
26
24
 
25
+ /**
26
+ * Stores the last known tabindex since the element has been disabled.
27
+ */
28
+ protected _lastTabIndex: number | undefined | null;
29
+
27
30
  /**
28
31
  * When the user has changed tabindex while the element is disabled,
29
32
  * the observer reverts tabindex to -1 and rather saves the new tabindex value to apply it later.
@@ -8,8 +8,6 @@ import { DisabledMixin } from './disabled-mixin.js';
8
8
  /**
9
9
  * A mixin to toggle the `tabindex` attribute.
10
10
  *
11
- * By default, the attribute is set to 0 that makes the element focusable.
12
- *
13
11
  * The attribute is set to -1 whenever the user disables the element
14
12
  * and restored with the last known value once the element is enabled.
15
13
  *
@@ -22,11 +20,11 @@ export const TabindexMixin = (superclass) =>
22
20
  return {
23
21
  /**
24
22
  * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.
23
+ *
25
24
  * @protected
26
25
  */
27
26
  tabindex: {
28
27
  type: Number,
29
- value: 0,
30
28
  reflectToAttribute: true,
31
29
  observer: '_tabindexChanged'
32
30
  },
@@ -34,11 +32,10 @@ export const TabindexMixin = (superclass) =>
34
32
  /**
35
33
  * Stores the last known tabindex since the element has been disabled.
36
34
  *
37
- * @private
35
+ * @protected
38
36
  */
39
- __lastTabIndex: {
40
- type: Number,
41
- value: 0
37
+ _lastTabIndex: {
38
+ type: Number
42
39
  }
43
40
  };
44
41
  }
@@ -57,11 +54,11 @@ export const TabindexMixin = (superclass) =>
57
54
 
58
55
  if (disabled) {
59
56
  if (this.tabindex !== undefined) {
60
- this.__lastTabIndex = this.tabindex;
57
+ this._lastTabIndex = this.tabindex;
61
58
  }
62
59
  this.tabindex = -1;
63
60
  } else if (oldDisabled) {
64
- this.tabindex = this.__lastTabIndex;
61
+ this.tabindex = this._lastTabIndex;
65
62
  }
66
63
  }
67
64
 
@@ -74,7 +71,7 @@ export const TabindexMixin = (superclass) =>
74
71
  */
75
72
  _tabindexChanged(tabindex) {
76
73
  if (this.disabled && tabindex !== -1) {
77
- this.__lastTabIndex = tabindex;
74
+ this._lastTabIndex = tabindex;
78
75
  this.tabindex = -1;
79
76
  }
80
77
  }