Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Losing focus in Android Chrome #58

Open
subvertallchris opened this issue Nov 2, 2017 · 0 comments
Open

Losing focus in Android Chrome #58

subvertallchris opened this issue Nov 2, 2017 · 0 comments

Comments

@subvertallchris
Copy link

This might be way too much of an edge case for anyone else to have run into it but...

I'm working with a webapp on Chrome that makes use of a Bluetooth controller, each key mapped to normal keyboard keys (w, a, s, d) as shortcuts. I'm having an issue on Android. It appears that when the virtual keyboard appears on screen, focus is lost until I interact with something else in the OS and then return to the browser. It can be as simple as hitting my hardware Menu button or pulling down the system settings menu at the top of the page. I know that it's not an issue with my controller because as long as I am focused on a form element, my keypresses register normally; however, my shortcuts do not.

I'm registering my shortcuts in what might be a heavy-handed way:

      <div style={{ display: 'none' }}>
        <Shortcuts name='IN_PROGRESS' targetNodeSelector='body' global handler={this.handleShortcuts} />
      </div>

Perhaps that has something to do with it? I unfortunately am not too sure how to begin troubleshooting this, but I appreciate any suggestions. This allows my keypresses to work without having to focus anywhere on the page. It's working great on both Mac and Ubuntu, Android is the only problem due to the nature of the virtual keyboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant