diff --git a/internal/uidriver/js/ui_js.go b/internal/uidriver/js/ui_js.go index 60ef4de06..cb353ac9c 100644 --- a/internal/uidriver/js/ui_js.go +++ b/internal/uidriver/js/ui_js.go @@ -396,6 +396,10 @@ func init() { theUI.input.recoverCursorPosition() return nil })) + document.Call("addEventListener", "pointerlockerror", js.FuncOf(func(this js.Value, args []js.Value) interface{} { + js.Global().Get("console").Call("error", "pointerlockerror event is fired. 'sandbox=\"allow-pointer-lock\"' might be required.") + return nil + })) } func setWindowEventHandlers(v js.Value) {