Skip to content

Detect focus on devtools #981

Closed

Description

@jwu

Hi,

I read the document and only found the ability to detect focus and blur for Browser Window. But in my case, I wish the atom-shell can tell me when I focus on and blur off the dev tools.

Any idea how can I do this?

Activity

  1. changed the title [-]Detect focus on dev tools[/-] [+]Detect focus on devtools[/+] on Jan 7, 2015
  2. zcbenz commented on Jan 7, 2015

    @zcbenz
    Contributor

    There are devtools-opened and devtools-closed events that can detect the open and close of devtools, there is no way to detect focus/blur on devtools yet.

  3. jwu commented on Apr 18, 2015

    @jwu
    Author

    Hi,

    I was testing the new devtools-focused event for the new version ( v0.23.0, v0.24.0 ) of atom-shell in Mac, and found it didn't works. Hope someone can reopen the issue :)

    Here is some of my test code:

            mainWin.on( 'devtools-focused', function ( event ) {
                console.log('devtools-focused');
            });
            mainWin.on( 'devtools-opened', function ( event ) {
                console.log('devtools-opened');
            });
            mainWin.on( 'focus', function ( event ) {
                console.log('focus');
            });

    The focus and devtools-opened event will be responed as they do, the devtools-focused missed.

  4. jwu commented on May 22, 2015

    @jwu
    Author

    ping @zcbenz @deepak1556 :). Still not working in v0.26.1.

  5. deepak1556 commented on May 22, 2015

    @deepak1556
    Member

    hmm not sure how its broken, have to fix it. @zcbenz can we reopen this issue ?

  6. reopened this on May 22, 2015
  7. deepak1556 commented on Aug 4, 2015

    @deepak1556
    Member

    @jwu just tested on v0.30.2 the event seems to be working on linux, could you confirm if this still a problem with mac ?

  8. jwu commented on Aug 5, 2015

    @jwu
    Author

    @deepak1556, just tested on mac with v0.30.2, still not work :(

  9. bpasero commented on Sep 14, 2015

    @bpasero
    Contributor

    It would be nice if browser window has a boolean flag to tell me if focus is inside dev tools or not.

  10. self-assigned this
    on Sep 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions