Fix game unfocusable after clicking on iframe
This commit is contained in:
parent
2232f7caf4
commit
6863fa3764
2 changed files with 5 additions and 9 deletions
|
@ -255,6 +255,11 @@ export class UserInputManager {
|
|||
(pointer: Phaser.Input.Pointer, gameObjects: Phaser.GameObjects.GameObject[]) => {
|
||||
this.joystick?.hide();
|
||||
this.userInputHandler.handlePointerUpEvent(pointer, gameObjects);
|
||||
|
||||
// Disable focus on iframe (need by Firefox)
|
||||
if (pointer.downElement.nodeName === "CANVAS" && document.activeElement instanceof HTMLIFrameElement) {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue