Skip to content

acceptFirstMouse is not applied when secondary click performed #11800

Closed

Description

@shiftkey
  • Electron version: 1.7.12 and 1.8.1
  • Operating system: macOS High Sierra (10.13.2)

Expected behavior

When acceptFirstMouse is true on the options set for a BrowserWindow, and the window is not focused, a secondary click (in Windows-speak, right-click) on the window should set it as the focused window.

Actual behavior

A contextmenu listener with a callback fires to display an alert box, indicating the secondary click was received, but the focused application does not change in the menu bar.

How to reproduce

$ git clone https://github.com/shiftkey/electron-quick-start -b accept-first-click
$ npm install
$ npm start

Then switch to a different window so the Electron app is not focused, and try performing a secondary click into the window.

Activity

  1. shiftkey commented on Feb 1, 2018

    @shiftkey
    ContributorAuthor

    For reference, @iAmWillShepherd mentioned that he could reproduce this outside of Electron:

    turns out this behavior is present in my browser as well (Firefox). Just opened a terminal, right-clicked in my browser so that a context menu appears, and I typed a little message to myself in my terminal (iTerm2)

    So this might be by design 🤷‍♂️

  2. sofianguy commented on Jan 7, 2019

    @sofianguy
    Contributor

    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 v2.0.x 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.

    Thanks in advance! Your help is appreciated.

  3. added
    blocked/need-info ❌
    on Jan 7, 2019
  4. sofianguy commented on Jan 15, 2019

    @sofianguy
    Contributor

    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.

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