Skip to content

Commit 61b28df

Browse files
authored
Merge pull request #1858 from finetjul/rwi-observe-document
Rwi observe document
2 parents df7d86e + b856cc8 commit 61b28df

File tree

1 file changed

+3
-9
lines changed
  • Sources/Rendering/Core/RenderWindowInteractor

1 file changed

+3
-9
lines changed

Sources/Rendering/Core/RenderWindowInteractor/index.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,9 @@ function vtkRenderWindowInteractor(publicAPI, model) {
232232
container.addEventListener('mouseleave', publicAPI.handleMouseLeave);
233233
container.addEventListener('mousemove', publicAPI.handleMouseMove);
234234
container.addEventListener('mousedown', publicAPI.handleMouseDown);
235-
document
236-
.querySelector('body')
237-
.addEventListener('keypress', publicAPI.handleKeyPress);
238-
document
239-
.querySelector('body')
240-
.addEventListener('keydown', publicAPI.handleKeyDown);
241-
document
242-
.querySelector('body')
243-
.addEventListener('keyup', publicAPI.handleKeyUp);
235+
document.addEventListener('keypress', publicAPI.handleKeyPress);
236+
document.addEventListener('keydown', publicAPI.handleKeyDown);
237+
document.addEventListener('keyup', publicAPI.handleKeyUp);
244238

245239
document.addEventListener(
246240
'pointerlockchange',

0 commit comments

Comments
 (0)