Skip to content

Commit

Permalink
feat: switch to mouseover and mouseout as default events
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljablonski committed Jun 16, 2024
1 parent 2bc225a commit f85c6d8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ const Tooltip = ({
const actualOpenEvents: AnchorOpenEvents = openEvents
? { ...openEvents }
: {
mouseenter: true,
focus: true,
mouseover: true,
focus: true,
mouseenter: false,
click: false,
dblclick: false,
mousedown: false,
Expand All @@ -120,9 +120,9 @@ const Tooltip = ({
const actualCloseEvents: AnchorCloseEvents = closeEvents
? { ...closeEvents }
: {
mouseleave: true,
blur: true,
mouseout: true,
blur: true,
mouseleave: false,
click: false,
dblclick: false,
mouseup: false,
Expand Down Expand Up @@ -544,7 +544,7 @@ const Tooltip = ({
handleHideTooltip()
}

const regularEvents = ['mouseenter', 'mouseleave', 'mouseover', 'mouseout', 'focus', 'blur']
const regularEvents = ['mouseover', 'mouseout', 'mouseenter', 'mouseleave', 'focus', 'blur']
const clickEvents = ['click', 'dblclick', 'mousedown', 'mouseup']

Object.entries(actualOpenEvents).forEach(([event, enabled]) => {
Expand Down

0 comments on commit f85c6d8

Please sign in to comment.