@vaadin/component-base 23.3.0-alpha2 → 23.3.0-alpha3

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.3.0-alpha2",
3
+ "version": "23.3.0-alpha3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -42,5 +42,5 @@
42
42
  "@vaadin/testing-helpers": "^0.3.2",
43
43
  "sinon": "^13.0.2"
44
44
  },
45
- "gitHead": "ae61027c62ffa7f7d70cfc50e43f333addfc74b6"
45
+ "gitHead": "e86cd2abf3e28bade37711291331415d92c454ec"
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.3.0-alpha2';
42
+ return '23.3.0-alpha3';
43
43
  }
44
44
 
45
45
  /** @protected */
@@ -67,7 +67,9 @@ export class TooltipController extends SlotController {
67
67
  setOpened(opened: boolean): void;
68
68
 
69
69
  /**
70
- * Set position on the slotted tooltip.
70
+ * Set default position for the slotted tooltip.
71
+ * This can be overridden by setting the position
72
+ * using corresponding property or attribute.
71
73
  */
72
74
  setPosition(position: TooltipPosition): void;
73
75
 
@@ -39,7 +39,7 @@ export class TooltipController extends SlotController {
39
39
  }
40
40
 
41
41
  if (this.position !== undefined) {
42
- this.__updatePosition(tooltipNode, this.position);
42
+ tooltipNode._position = this.position;
43
43
  }
44
44
 
45
45
  if (this.shouldShow !== undefined) {
@@ -87,13 +87,18 @@ export class TooltipController extends SlotController {
87
87
  }
88
88
 
89
89
  /**
90
- * Set position on the slotted tooltip.
90
+ * Set default position for the slotted tooltip.
91
+ * This can be overridden by setting the position
92
+ * using corresponding property or attribute.
91
93
  * @param {string} position
92
94
  */
93
95
  setPosition(position) {
94
96
  this.position = position;
95
97
 
96
- this.__updatePosition(this.node, position);
98
+ const tooltipNode = this.node;
99
+ if (tooltipNode) {
100
+ tooltipNode._position = position;
101
+ }
97
102
  }
98
103
 
99
104
  /**
@@ -122,11 +127,4 @@ export class TooltipController extends SlotController {
122
127
  tooltipNode.target = target;
123
128
  }
124
129
  }
125
-
126
- /** @private */
127
- __updatePosition(node, position) {
128
- if (node && !node.hasAttribute('position')) {
129
- node.position = position;
130
- }
131
- }
132
130
  }
@@ -349,6 +349,12 @@ export class IronListAdapter {
349
349
  }
350
350
 
351
351
  this.__previousScrollTop = this._scrollTop;
352
+
353
+ // If the first visible index is not 0 when scrolled to the top,
354
+ // add some scroll offset to enable the user to continue scrolling.
355
+ if (this._scrollTop === 0 && this.firstVisibleIndex !== 0) {
356
+ this._scrollTop = 1;
357
+ }
352
358
  }
353
359
 
354
360
  /** @private */