Skip to content

[Problem/Bug]: the tooltip that appears on hover may not disappear #5245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bayashi opened this issue May 17, 2025 · 2 comments
Open

[Problem/Bug]: the tooltip that appears on hover may not disappear #5245

bayashi opened this issue May 17, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@bayashi
Copy link

bayashi commented May 17, 2025

What happened?

I'm not sure this is a bug of WebView2. I just met a strange behaviour, so I report it:

If an element with a title attribute has no surrounding margin, the tooltip that appears on hover may not disappear as expected.The tooltip remains visible when the cursor moves directly from a hovered element to outside the application window, without passing through any margin or buffer area.

I have encountered this behavior in a Tauri application. The application does not have any window decorations, and the area outside the element with the title attribute directly corresponds to the outside of the application window. While adding a margin around the element mitigated the issue, the expected behavior is for the tooltip to be dismissed even when the cursor moves directly from the element to outside the application window.

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

136.0.3240.76

SDK Version

No response

Framework

Other

Operating System

Windows 10

OS Version

Windows 10.0.19045 x86_64 (X64)

Repro steps

Download and run this app v0.2.13
https://github.com/bayashi/mclocks/releases/tag/mclocks-v0.2.13

The user reported issue on this app: bayashi/mclocks#195

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

@bayashi bayashi added the bug Something isn't working label May 17, 2025
@sivMSFT
Copy link

sivMSFT commented May 19, 2025

@bayashi, could you please help with the below mentioned?

  1. Are you using any custom input event handlers or interceptors in your Tauri app that might interfere with native mouse events
  2. Have you tried enabling the msWebView2BrowserHitTransparent flag in your runtime?
  3. Would switching to a custom tooltip implementation be feasible for your UI design?

@bayashi
Copy link
Author

bayashi commented May 19, 2025

@sivMSFT

Are you using any custom input event handlers or interceptors in your Tauri app that might interfere with native mouse events

I'm using custom input event for shortcut-keys: https://github.com/bayashi/mclocks/blob/main/src/app.js#L67-L76
I'm not using any native mouse events.

Have you tried enabling the msWebView2BrowserHitTransparent flag in your runtime?

No. I'm not sure Tauri would enable it or not. I haven't.

Would switching to a custom tooltip implementation be feasible for your UI design?

Yeah, I thought a way to implement by a custom tooltip, but the native tooltip is highly effective because they automatically position themselves in an optimal location, regardless of the application's layout or screen position.

As a side note: This PR resolved the issue: https://github.com/bayashi/mclocks/pull/198/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants