You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Mouse event forwarding is buggy win.setIgnoreMouseEvents(true, {forward: true}); #30808
I was trying to create a minimal repro of a bug we encountered with our product, the original issue is: mouseleave event / :hover pseudo class not working reliably on Windows after win.setIgnoreMouseEvents(true, {forward: true}).
However the actual repro "exceeds" my expectation and acts much weirder.
Reacted by Yoojun Zhou
Reacted by Nooc, DevLeon, JellyBrick and Yoojun Zhou
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.
For what it's worth, the issue in the original gist is that win.setIgnoreMouseEvents is being called before win.loadFile. Changing the order of those calls makes the gist work.
That being said, I am still facing the issue where mouse event forwarding isn't working properly on Windows with Electron 22. It either forwards a bunch of mouseenter and mouseleave events (even if I don't enter or leave the element), or just doesn't forward at all.
Activity
vilicvane commentedon Sep 2, 2021
The original issue (wait till the last seconds), in this case we are toggling
setIgnoreMouseEventsupon mouse entering/leaving:lmachens commentedon Nov 30, 2021
Same issue here on Windows 10 build 19042.
Did you find a solution @vilic?
github-actions commentedon Oct 5, 2022
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
github-actions commentedon Nov 5, 2022
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.
pushkin- commentedon Nov 28, 2022
pretty sure I can still repro this on Windows with Electron 21
vilicvane commentedon Nov 28, 2022
Hmm, no. After another year. Actually, the project was canceled so we never tested that again.
6 remaining items
agleis commentedon Jun 1, 2023
For what it's worth, the issue in the original gist is that
win.setIgnoreMouseEventsis being called beforewin.loadFile. Changing the order of those calls makes the gist work.That being said, I am still facing the issue where mouse event forwarding isn't working properly on Windows with Electron 22. It either forwards a bunch of
mouseenterandmouseleaveevents (even if I don't enter or leave the element), or just doesn't forward at all.JellyBrick commentedon Aug 31, 2023
We have the same problem in our project.
Without
win.setIgnoreMouseEvents(true, {forward: true})(Expected behavior)With
win.setIgnoreMouseEvents(true, {forward: true})(Actual behavior)Code
proximity-opacity logic: https://github.com/organization/alspotron/blob/034532e01f1180344e6d7593665718acc5df9b98/renderer/main/App.tsx#L56
setIgnoreMouseEvents: https://github.com/organization/alspotron/blob/034532e01f1180344e6d7593665718acc5df9b98/src/Application.ts#L590
It is reproducible on
Windows 11+ Electron25,26.1.0, and27.0.0,28.1.0.codebytere commentedon Oct 18, 2023
This is the underlying logic: #10183 - it's essentially unchanged from that initial PR if anyone with more background wants to take a look.
JellyBrick commentedon Aug 1, 2024
Still reproducible on Electron v31
NotYoojun commentedon Jul 8, 2025
Reproducible on Electron v35
viniciusmichelutti commentedon Feb 22, 2026
Still not working
codebytere commentedon Feb 23, 2026
Was there a version this did work?
Eneris commentedon Jun 11, 2026
Still present in Electron 42
test: add setIgnoreMouseEvents forwarding regression cases for electr…
refactor: mouse forwarding on Windows (#52633)
refactor: mouse forwarding on Windows (#54803)
refactor: mouse forwarding on Windows (#54802)
refactor: mouse forwarding on Windows (electron#52633)
refactor: mouse forwarding on Windows (electron#52633)