@fluid-topics/ft-tooltip 2.1.12 → 2.1.15

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.
@@ -43,5 +43,6 @@ export declare class FtTooltip extends FtLitElementWithI18n implements FtTooltip
43
43
  private onFocusIn;
44
44
  private onOut;
45
45
  private onClick;
46
+ private matchesIgnored;
46
47
  protected isIgnored(e: Event): boolean;
47
48
  }
@@ -38,6 +38,9 @@ export class FtTooltip extends FtLitElementWithI18n {
38
38
  if (!this.isIgnored(e)) {
39
39
  this.show();
40
40
  }
41
+ else if (this.matchesIgnored(e)) {
42
+ this.hide();
43
+ }
41
44
  };
42
45
  this.onFocusIn = (e) => {
43
46
  if (!this.isIgnored(e) && window.FluidTopicsA11yHints.isKeyboardNavigation && window.FluidTopicsA11yHints.lastPressedKey === "Tab") {
@@ -210,8 +213,11 @@ export class FtTooltip extends FtLitElementWithI18n {
210
213
  }
211
214
  }, this.manual ? 0 : this.delay);
212
215
  }
216
+ matchesIgnored(e) {
217
+ return eventPathContainsMatchingElement(e, this.ignoreMatchingElements, this.eventsTarget);
218
+ }
213
219
  isIgnored(e) {
214
- return this.manual || eventPathContainsMatchingElement(e, this.ignoreMatchingElements, this.eventsTarget);
220
+ return this.manual || this.matchesIgnored(e);
215
221
  }
216
222
  }
217
223
  FtTooltip.elementDefinitions = {