Mouseover does not work in WebView in NSPanel with NSNonactivatingPanelMask mask style

I created an NSPanel with styleMask from NSNonactivatingPanelMask. And I put the WebView in this NSPanel, and when I hover over some HTML buttons, I don’t see the hover effect. I made this key window and the main NSPanel window, but this does not help. How can i fix this?

+3
source share
1 answer

NSPanelmust be the key window, and WebViewmust be the first responder:

[panel makeFirstResponder:webView];

This sounds like an error to me, because scrolling the web view, even if it is not the first responder, correctly selects the buttons with the hover effect.

+1
source

All Articles