Skip to content

OrbitControls Keyboard controls don't work when in an Iframe #15619

@greggman

Description

@greggman
Description of the problem

The keyboard for OrbitControls don't work in an iframe. The reason is the mousedown handler calles preventDefault. Part of that default is the iframe getting the focus

See this example: https://jsfiddle.net/3foLr7sn/ or this one https://jsfiddle.net/qgu17w5o/ both are the default bug report examples

Drag on the sphere then press the arrow keys. Note they don't work

Three.js version
  • Dev
  • r100
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, ...)

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions