Skip to content

Conversation

@dauriamarco
Copy link
Member

Fix for the dismissible tooltip visibility on Safari. Clicking a button does not give it focus in Safari according to MDN and WebKit Bug #22261, preventing any focus-dependent logic (e.g., tooltips) from working properly.


@dauriamarco dauriamarco self-assigned this Sep 29, 2025
@dauriamarco dauriamarco requested a review from a team as a code owner September 29, 2025 08:29
@github-actions
Copy link

@dauriamarco dauriamarco force-pushed the fix/dismissible-tooltip-safari branch from 56d354d to 0d94679 Compare September 30, 2025 10:07
@github-actions
Copy link

Code Coverage

@spike-rabbit spike-rabbit requested a review from dr-itz September 30, 2025 12:13
@spike-rabbit
Copy link
Member

I am not having a Mac. @dr-itz please confirm here

@dr-itz
Copy link
Contributor

dr-itz commented Sep 30, 2025

I am not having a Mac.

that's a problem that can be fixed 🤷 😃

@dr-itz please confirm here

well, it works as intended. But. On Safari clicking a button doesn't move the focus. That's the platform behaviour. And this MR changes that for buttons with tooltips. I don't like that.

And I also question why would a button show a tooltip on click? Focus by tab is another thing. But click means whatever action is behind the button has already been executed. (except the case like in the demo where the only action is showing the tooltip, but then why the focus trigger).

@dauriamarco
Copy link
Member Author

well, it works as intended. But. On Safari clicking a button doesn't move the focus. That's the platform behaviour. And this MR changes that for buttons with tooltips. I don't like that.

And I also question why would a button show a tooltip on click? Focus by tab is another thing. But click means whatever action is behind the button has already been executed. (except the case like in the demo where the only action is showing the tooltip, but then why the focus trigger).

@dr-itz @spike-rabbit We had already discussed this fix on GitLab, and I initially also thought about changing the input to readonly triggers = input<'' | 'click'>(); (or even removing the possibility of having a dismissible tooltip as you mentioned, I see your point). But you correctly pointed out back then that this would be a breaking change.

That’s why I also suggested a non-breaking temporary solution which I don't really like as well, but I haven’t received updates after that. At this stage, we can directly decide whether we want to keep or completely get rid of the dismissible tooltip, and how to handle it (?).

Let me know what you think 👍

@spike-rabbit
Copy link
Member

spike-rabbit commented Oct 1, 2025

I see, first thought that this is still a bug after we updated the keyboard interaction, but this was the popover I thought about.

Anyway, the triggers input is something that should be deprecated and removed. All tooltips are supposed to have an identical interaction pattern: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/tooltip_role. With the description there I see also no Safari problem, correct?

@dauriamarco
Copy link
Member Author

Closing this in favor of #1245.

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.

4 participants