Skip to content

Commit

Permalink
Revert input.js for now
Browse files Browse the repository at this point in the history
  • Loading branch information
ehfd authored Mar 23, 2024
1 parent f74eaf1 commit ad08a3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addons/gst-web/src/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ class Input {
/**
* When fullscreen is entered, request keyboard and pointer lock.
*/
_onFullscreenChange(e) {
if (e.matches) {
_onFullscreenChange() {
if (document.fullscreenElement !== null) {
// Enter fullscreen
this.requestKeyboardLock();
this.element.requestPointerLock();
Expand Down Expand Up @@ -540,7 +540,7 @@ class Input {
this.listeners.push(addListener(this.element, 'resize', this._windowMath, this));
this.listeners.push(addListener(this.element, 'wheel', this._mouseWheelWrapper, this));
this.listeners.push(addListener(this.element, 'contextmenu', this._contextMenu, this));
this.listeners.push(addListener(window.matchMedia('(display-mode: fullscreen)'), 'change', this._onFullscreenChange, this));
this.listeners.push(addListener(this.element.parentElement, 'fullscreenchange', this._onFullscreenChange, this));
this.listeners.push(addListener(document, 'pointerlockchange', this._pointerLock, this));
this.listeners.push(addListener(window, 'keydown', this._key, this));
this.listeners.push(addListener(window, 'keyup', this._key, this));
Expand Down

0 comments on commit ad08a3d

Please sign in to comment.