-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
webview mouse enter / leave not working correctly in 0.29.x #6518
Comments
I should also note that if I switch from a webview to an iframe everything works fine in the 0.29.x branch. So something is going on specifically with the webview. |
This seems to be a focus issue. |
If you manually click inside the window then leave and enter things work one time. Repeating that process it will work exactly one time. Attach mouseenter and mouseout events and log the output you'll see that mouseout is not called when mouse exits the window. But when you enter window again you'll see that mouseout is fired and then immediately mouseenter is fired. This is very strange behavior. Seems to be related to focus but I cannot simulate taking focus using JavaScript to work around it. You have to physically click inside the window to make events fire correctly. |
I can make a screencast showing this behavior if need be |
I can reproduce this issue on Linux/Windows with nwjs-sdk-v0.29.0. |
@Christywl does it work in a Chrome App in Chrome browser? |
It works fine in a Chrome App with Chrome M65. |
I know it wasn't specifically addressed yet but just wanted to note that the issue still exists in 0.29.2 |
Yeah. Will definitely look to fix this. 0.29.2 was released to catch up an upstream security update. |
Unfortunately in 0.30.0-beta1 the issue is actually worse. Hiding/Showing scrollbar using CSS hover on a webview works exactly once while the app is started. Whereas in 0.29 you could focus away and focus back and it'd work again. |
Does everything work for you if passed |
This is fixed in git and will be available in the next nightly build. cc #6171 |
@rogerwang yes passing "--enable-features=GuestViewCrossProcessFrames" to nw.exe works for me |
I tried it with NW 0.30.0-beta1 |
Also tested in NW 0.29.2 and it works great. Thanks @rogerwang !!!! |
NWJS Version : 0.29.0 and 0.29.1
Operating System : Windows 10
Expected behavior
Mouse enter and leave events should be fired when mouse enters and leaves the webview. This behavior worked fine prior to 0.29.x branch. I've tested with the 0.26 branch and the 0.28 branch and it works as expected there.
Actual behavior
Sometimes mouse enter and leave fire but its sporadic and most of the time it works just once.
How to reproduce
The way I'm reproducing it is by having a small app that has some content to scroll inside a webview. The scrollbar is hidden when mouse exits and shown when mouse enters. I'm using CSS to do this rather than the actual mouse enter and leave events although I've tried that with the same effect.
Here are the files you can use to reproduce the behavior:
package.json
index.html
Here is the index.html for the content to load into the webview for the mouse enter and leave event test. I'm using
live-server
to serve this up to my webview.The text was updated successfully, but these errors were encountered: