Skip to content

Commit 17ddd2d

Browse files
authoredSep 5, 2024··
Merge pull request #909 from Trendyol/tooltip-mouse-bug
fix(tooltip): use mouseenter as event listener
2 parents 7e628bb + eae5d54 commit 17ddd2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/components/tooltip/bl-tooltip.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default class BlTooltip extends LitElement {
6161

6262
if (target) {
6363
target.addEventListener("focus", this.show, { capture: true });
64-
target.addEventListener("mouseover", this.show);
64+
target.addEventListener("mouseenter", this.show);
6565
target.addEventListener("blur", this.hide, { capture: true });
6666
target.addEventListener("mouseleave", this.hide);
6767
}
@@ -72,7 +72,7 @@ export default class BlTooltip extends LitElement {
7272

7373
if (target) {
7474
target.removeEventListener("focus", this.show, { capture: true });
75-
target.removeEventListener("mouseover", this.show);
75+
target.removeEventListener("mouseenter", this.show);
7676
target.removeEventListener("blur", this.hide, { capture: true });
7777
target.removeEventListener("mouseleave", this.hide);
7878
}
@@ -124,7 +124,7 @@ export default class BlTooltip extends LitElement {
124124
aria-describedby="tooltip"
125125
@focus=${{ handleEvent: () => this.show(), capture: true }}
126126
@blur=${{ handleEvent: () => this.hide(), capture: true }}
127-
@mouseover=${() => this.show()}
127+
@mouseenter=${() => this.show()}
128128
@mouseleave=${() => this.hide()}
129129
>
130130
</slot>`;

0 commit comments

Comments
 (0)
Please sign in to comment.