Skip to content

Commit fc0d7a7

Browse files
vogtnnmetulev
authored andcommitted
[person] updating mouseEnter to not reset if click inside of the card (#209)
* [person] updating mouseEnter to not reset if click inside of the card * [person] fixing hover showing person-card during click state
1 parent c8c2f19 commit fc0d7a7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/mgt-person/mgt-person.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,11 @@ export class MgtPerson extends MgtTemplatedComponent {
293293
}
294294

295295
private _handleMouseEnter(e: MouseEvent) {
296+
clearTimeout(this._mouseEnterTimeout);
297+
clearTimeout(this._mouseLeaveTimeout);
296298
if (this.personCardInteraction !== PersonCardInteraction.hover) {
297299
return;
298300
}
299-
300-
clearTimeout(this._mouseEnterTimeout);
301-
clearTimeout(this._mouseLeaveTimeout);
302301
this._mouseEnterTimeout = setTimeout(this._showPersonCard.bind(this), 500);
303302
}
304303

0 commit comments

Comments
 (0)