@vaadin/tabs 23.3.9 → 23.3.11

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/tabs",
3
- "version": "23.3.9",
3
+ "version": "23.3.11",
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.9",
40
- "@vaadin/item": "~23.3.9",
41
- "@vaadin/vaadin-list-mixin": "~23.3.9",
42
- "@vaadin/vaadin-lumo-styles": "~23.3.9",
43
- "@vaadin/vaadin-material-styles": "~23.3.9",
44
- "@vaadin/vaadin-themable-mixin": "~23.3.9"
39
+ "@vaadin/component-base": "~23.3.11",
40
+ "@vaadin/item": "~23.3.11",
41
+ "@vaadin/vaadin-list-mixin": "~23.3.11",
42
+ "@vaadin/vaadin-lumo-styles": "~23.3.11",
43
+ "@vaadin/vaadin-material-styles": "~23.3.11",
44
+ "@vaadin/vaadin-themable-mixin": "~23.3.11"
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": "e4d0f83bb9f0fc992b115358f0ffd672504f144a"
55
+ "gitHead": "1998b389444ed0bf24fc25cfa86a641d59e8a761"
56
56
  }
@@ -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
- let overflow = scrollPosition > 0 ? 'start' : '';
253
- overflow += scrollPosition + this._scrollOffset < scrollSize ? ' end' : '';
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/tabs",
4
- "version": "23.3.9",
4
+ "version": "23.3.11",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/tabs",
4
- "version": "23.3.9",
4
+ "version": "23.3.11",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {