Embedded mode scrolls enclosing page when arrow keys are pressed
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 4.4k
- PR merge metrics
- No merged PRs in 30d
Description
Description: There is no way to lock arrow key input to go to the A-Frame embedded view without going into fullscreen mode, and as a result, pressing the up/down arrow keys scrolls the page it's embedded in. This is actually evident in the A-Frame website itself.
Here is an example of a workaround you can do if you own the website you are embedding the A-Frame in. It involves checking whether the user has clicked on the body or the a-scene element and "freeing" or "freezing" the scroll accordingly. https://glitch.com/edit/#!/kiwi-magpie
I also had a question about whether the way A-Frame captures keyboard input is compliant with accessibility standards. I don't know enough about the standards to formulate a more specific question though. scratches head
- A-Frame Version: 0.8.0
- Platform / Device: 2015 MacBook Pro 15", Safari 11.1
- Reproducible Code Snippet or URL: https://aframe.io/docs/0.8.0/components/embedded.html
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior on the A-Frame embedded documentation page at https://aframe.io/docs/0.8.0/components/embedded.html, then compare it with the focus and scroll workaround shown in the linked Glitch example. Identify the embedded-mode keyboard entry point and verify that arrow keys no longer scroll the enclosing page while the embedded view is active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100