@brightspace-ui/core 3.81.0 → 3.81.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,12 +29,13 @@ const contentBorderSize = 1;
29
29
  const contentHorizontalPadding = 15;
30
30
  const outlineSize = 1;
31
31
 
32
- /* once a user shows a tooltip, ignore delay if they hover adjacent target within this timeout */
32
+ /* once a user closes a tooltip, ignore delay if they hover adjacent target within this timeout */
33
33
  let delayTimeoutId;
34
34
  const resetDelayTimeout = () => {
35
35
  if (delayTimeoutId) clearTimeout(delayTimeoutId);
36
36
  delayTimeoutId = setTimeout(() => delayTimeoutId = null, 1000);
37
37
  };
38
+ /* ignore delay if user hovers adjacent target when a tooltip is already open */
38
39
  const getDelay = delay => {
39
40
  if (delayTimeoutId) return 0;
40
41
  else return delay;
@@ -847,7 +848,6 @@ class Tooltip extends RtlMixin(LitElement) {
847
848
  if (!this._truncating) return;
848
849
  }
849
850
 
850
- resetDelayTimeout();
851
851
  this._isHovering = true;
852
852
  this._updateShowing();
853
853
  }, getDelay(this.delay));
@@ -925,6 +925,7 @@ class Tooltip extends RtlMixin(LitElement) {
925
925
  this._dismissibleId = null;
926
926
  }
927
927
  if (dispatch) {
928
+ resetDelayTimeout();
928
929
  this.dispatchEvent(new CustomEvent(
929
930
  'd2l-tooltip-hide', { bubbles: true, composed: true }
930
931
  ));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.81.0",
3
+ "version": "3.81.1",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",