@vaadin/tabs 23.3.10 → 23.3.12
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 +8 -8
- package/src/vaadin-tabs.js +11 -2
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/tabs",
|
|
3
|
-
"version": "23.3.
|
|
3
|
+
"version": "23.3.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/component-base": "~23.3.
|
|
40
|
-
"@vaadin/item": "~23.3.
|
|
41
|
-
"@vaadin/vaadin-list-mixin": "~23.3.
|
|
42
|
-
"@vaadin/vaadin-lumo-styles": "~23.3.
|
|
43
|
-
"@vaadin/vaadin-material-styles": "~23.3.
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "~23.3.
|
|
39
|
+
"@vaadin/component-base": "~23.3.12",
|
|
40
|
+
"@vaadin/item": "~23.3.12",
|
|
41
|
+
"@vaadin/vaadin-list-mixin": "~23.3.12",
|
|
42
|
+
"@vaadin/vaadin-lumo-styles": "~23.3.12",
|
|
43
|
+
"@vaadin/vaadin-material-styles": "~23.3.12",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "~23.3.12"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"web-types.json",
|
|
53
53
|
"web-types.lit.json"
|
|
54
54
|
],
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "bbac14aa7983200727e4baebd3be483c87579bd8"
|
|
56
56
|
}
|
package/src/vaadin-tabs.js
CHANGED
|
@@ -249,8 +249,17 @@ class Tabs extends ResizeMixin(ElementMixin(ListMixin(ThemableMixin(PolymerEleme
|
|
|
249
249
|
: this.__getNormalizedScrollLeft(this._scrollerElement);
|
|
250
250
|
const scrollSize = this._vertical ? this._scrollerElement.scrollHeight : this._scrollerElement.scrollWidth;
|
|
251
251
|
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
// Note that we are not comparing floored scrollPosition to be greater than zero here, which would make a natural
|
|
253
|
+
// sense, but to be greater than one intentionally. There is a known bug in Chromium browsers on Linux/Mac
|
|
254
|
+
// (https://bugs.chromium.org/p/chromium/issues/detail?id=1123301), which returns invalid value of scrollLeft when
|
|
255
|
+
// text direction is RTL. The value is off by one pixel in that case. Comparing scrollPosition to be greater than
|
|
256
|
+
// one on the following line is a workaround for that bug. Comparing scrollPosition to be greater than one means,
|
|
257
|
+
// that the left overflow and left arrow will be displayed "one pixel" later than normal. In other words, if the tab
|
|
258
|
+
// scroller element is scrolled just by 1px, the overflow is not yet showing.
|
|
259
|
+
let overflow = Math.floor(scrollPosition) > 1 ? 'start' : '';
|
|
260
|
+
if (Math.ceil(scrollPosition) < Math.ceil(scrollSize - this._scrollOffset)) {
|
|
261
|
+
overflow += ' end';
|
|
262
|
+
}
|
|
254
263
|
|
|
255
264
|
if (this.__direction === 1) {
|
|
256
265
|
overflow = overflow.replace(/start|end/gi, (matched) => {
|
package/web-types.json
CHANGED