Skip to content

OrbitControls keydown event #15776

@Bertagit

Description

@Bertagit
Description of the problem

The controls add an event keydown on window, though a specific dom element is passed at the constructor, this prevent the use of keyboard, also in text input, throughout the DOM. In my project i use vue.js with vuetify

In OrbitControls.js at the row 929:
window.addEventListener( 'keydown', onKeyDown, false );
for fix the problem my solution is replace this line with:
scope.domElement.addEventListener( 'keydown', onKeyDown, false );

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

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