Skip to content

fix(ButtonIcon): stop mouse clicks from leaving the tooltip stuck open - #20

Closed
caro3801 wants to merge 1 commit into
mainfrom
fix/button-icon-tooltip-sticky-on-click
Closed

caro3801 wants to merge 1 commit into
mainfrom
fix/button-icon-tooltip-sticky-on-click

Conversation

@caro3801

Copy link
Copy Markdown
Collaborator

BTooltip's default triggers are hover + focus. A native <button> keeps focus after a mouse click, so its tooltip stays visible until something else steals focus.

Adds @mousedown.prevent on ButtonIcon's root b-button: it stops a mouse click from focusing the button at all (click still fires normally), while keyboard activation (Tab, then Enter/Space) is unaffected since it focuses via focus(), not mousedown — the tooltip-on-focus behavior keyboard/screen-reader users rely on keeps working.

BTooltip's default triggers are hover + focus. A native <button> keeps
focus after a mouse click, so its tooltip stayed visible until
something else stole focus.

preventDefault on mousedown stops a mouse click from focusing the
button at all - the click itself still fires normally, only the
resulting focus is denied. Keyboard activation (Tab, then
Enter/Space) is unaffected since it focuses via focus(), not
mousedown, so the tooltip-on-focus behavior keyboard/screen-reader
users rely on still works exactly as before.
@caro3801

Copy link
Copy Markdown
Collaborator Author

Rolling back — dropping this approach for now, keeping the current focus/tooltip behavior as-is.

@caro3801 caro3801 closed this Aug 28, 2026
@caro3801
caro3801 deleted the fix/button-icon-tooltip-sticky-on-click branch August 28, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant