Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mouse hover not working in WebView in NSPanel with styleMask of NSNonactivatingPanelMask

I created a NSPanel with styleMask of NSNonactivatingPanelMask. And I put an WebView in this NSPanel, and when I put mouse on some HTML buttons, I can't see any hover effect. I made this NSPanel key window and main window, but it doesn't help. How can I fix this?

like image 765
backspacer Avatar asked Dec 07 '25 09:12

backspacer


1 Answers

The NSPanel must be the key window and the WebView must be the first responder:

[panel makeFirstResponder:webView];

This sounds like a bug to me because scrolling the web view even when it's not the first responder correctly highlights buttons with a hover effect.

like image 92
0xced Avatar answered Dec 09 '25 23:12

0xced