aframevr / aframevr/aframe

Consider checking `document.pointerLockElement` in `shouldCaptureKeyEvent`

Open
#4,582 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
17.6k
Forks
4.4k
PR merge metrics
No merged PRs in 30d

Description

Context in https://github.com/donmccurdy/aframe-extras/pull/321, perhaps not automatically true if pointerlock is enabled, but may need to look for document.activeElement === document.pointerLockElement or similar.

https://github.com/aframevr/aframe/blob/c606c25907bf5ad48cf8329ecd998fa48ff3a584/src/utils/index.js#L246-L254

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked A-Frame source at src/utils/index.js#L246-L254 and inspect shouldCaptureKeyEvent in the context of the pointer-lock behavior described in PR 321. Determine whether document.pointerLockElement or the active-element relationship should affect capture, then verify the expected behavior with the relevant existing tests or a focused reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.