Skip to content

[Bug]: Mouse event forwarding is buggy win.setIgnoreMouseEvents(true, {forward: true}); #30808

Closed

Description

@vilicvane

Preflight Checklist

Electron Version

14.0.0

What operating system are you using?

Windows

Operating System Version

OS build 19043.1165

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

:hover and mouse enter/leave event work without issue

Actual Behavior

:hover and mouse enter/leave event do not work(unreliable/flickering)

Testcase Gist URL

https://gist.github.com/7c945234e55000f21a5db29cc11600cd

Additional Information

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.

electron-forward-mouse-event-issue

Activity

  1. vilicvane commented on Sep 2, 2021

    @vilicvane
    Author

    The original issue (wait till the last seconds), in this case we are toggling setIgnoreMouseEvents upon mouse entering/leaving:

    electron-forward-mouse-event-issue-2

  2. added
    has-repro-gistIssue can be reproduced with code at https://gist.github.com/
    status/confirmedA maintainer reproduced the bug or agreed with the feature
    on Sep 2, 2021
  3. lmachens commented on Nov 30, 2021

    @lmachens

    Same issue here on Windows 10 build 19042.
    Did you find a solution @vilic?

  4. github-actions commented on Oct 5, 2022

    @github-actions
    Contributor

    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!

  5. github-actions commented on Nov 5, 2022

    @github-actions
    Contributor

    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.

  6. pushkin- commented on Nov 28, 2022

    @pushkin-

    pretty sure I can still repro this on Windows with Electron 21

  7. vilicvane commented on Nov 28, 2022

    @vilicvane
    Author

    Same issue here on Windows 10 build 19042. Did you find a solution @vilic?

    Hmm, no. After another year. Actually, the project was canceled so we never tested that again.

  8. 6 remaining items

  9. agleis commented on Jun 1, 2023

    @agleis

    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.

  10. JellyBrick commented on Aug 31, 2023

    @JellyBrick

    We have the same problem in our project.

    Without win.setIgnoreMouseEvents(true, {forward: true}) (Expected behavior)

    no-forward

    With win.setIgnoreMouseEvents(true, {forward: true}) (Actual behavior)

    forward

    Code

    It is reproducible on Windows 11 + Electron 25, 26.1.0, and 27.0.0, 28.1.0.

  11. codebytere commented on Oct 18, 2023

    @codebytere
    Member

    This is the underlying logic: #10183 - it's essentially unchanged from that initial PR if anyone with more background wants to take a look.

  12. JellyBrick commented on Aug 1, 2024

    @JellyBrick

    Still reproducible on Electron v31

  13. NotYoojun commented on Jul 8, 2025

    @NotYoojun

    Reproducible on Electron v35

  14. viniciusmichelutti commented on Feb 22, 2026

    @viniciusmichelutti

    Still not working

  15. codebytere commented on Feb 23, 2026

    @codebytere
    Member

    Was there a version this did work?

  16. Eneris commented on Jun 11, 2026

    @Eneris

    Still present in Electron 42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    14-x-y21-x-ybug 🪲has-repro-gistIssue can be reproduced with code at https://gist.github.com/platform/windowsstatus/confirmedA maintainer reproduced the bug or agreed with the feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions