Skip to content

setIgnoreMouseEvents({forward: true}) stops forwarding after a page reload #15376

Closed

Description

@toonvanvr
  • Output of node_modules/.bin/electron --version: 3.0.5
  • Operating System (Platform and Version): Windows 10 x64

Animated preview

Expected Behavior
BrowserWindow.setIgnoreMouseEvents() should keep working after refreshing the page with CTRL + R.

Actual behavior
Running browserWindow.setIgnoreMouseEvents({forward: true}) does not forward any events to the browserwindow after a refresh.

To Reproduce
Clone from this minimal example.

electron index.js

Code:

window.addEventListener('mousemove', function ( event ) {
  let el = event.target
  if (el.classList.contains('mouse') || el.classList.contains('window-handle')) {
    browserWindow.setIgnoreMouseEvents(false)
  } else {
    browserWindow.setIgnoreMouseEvents(true, {forward: true})
    // ^ this function stops forwarding after a refresh (CTRL+R)
  }
})

Additional Information
implementation of setIgnoreMouseEvents
implementation of SetForwardMouseMessages

Use case
Developer tools on the filesystem don't function well before a page refresh, but doing so breaks the app. This slows down development a lot.

Guess:
Maybe setIgnoreMouseEvents keeps working with a previous native window handle?

Activity

  1. welcome commented on Oct 24, 2018

    @welcome

    👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

    To help make it easier for us to investigate your issue, please follow the contributing guidelines.

  2. changed the title [-]setIgnoreMouseEvents({forward: true}) stops forwarding after a page reload[/-] [+]setIgnoreMouseEvents() does nothing after a page reload[/+] on Oct 25, 2018
  3. changed the title [-]setIgnoreMouseEvents() does nothing after a page reload[/-] [+]setIgnoreMouseEvents({forward: true}) stops forwarding after a page reload[/+] on Oct 25, 2018
  4. Cobertos commented on May 28, 2019

    @Cobertos

    Still getting this issue.

    Electron Version: v4.2.0
    Operating System: Windows 10 x64 build 17134

  5. electron-triage commented on Feb 19, 2020

    @electron-triage

    Thank you for taking the time to report this issue and helping to make Electron better.

    The version of Electron you reported this on has been superseded by newer releases.

    If you're still experiencing this issue in Electron 6.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.

    I'm setting the blocked/need-info label for the above reasons. This issue will be closed 7 days from now if there is no response.

    Thanks in advance! Your help is appreciated.

  6. electron-triage commented on Feb 26, 2020

    @electron-triage

    Thank you for your issue!

    We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.

  7. chevonc commented on Mar 10, 2020

    @chevonc

    Seeing this as well on electorn 7.1.3 :/

  8. alectrocute commented on Mar 18, 2020

    @alectrocute

    Yup, I've battled this one for many months. :(

  9. momakes3 commented on Mar 19, 2020

    @momakes3

    @chevonc @alectrocute Commenting on a closed issue doesn't help at all. Please create a new issue so it'll be reviewing for the recent versions.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions