aframevr / aframevr/aframe

Embedded mode scrolls enclosing page when arrow keys are pressed

Open
#3,958 2 comments 0 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

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.