From 0ec5b7b8572fa023019c049c3b9e5d3358b70e6c Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 23 Jul 2021 02:15:41 +0900 Subject: [PATCH] internal/uidriver/js: Bug fix: Suppress warnings on SetFullscreen Closes #1727 --- internal/uidriver/js/ui_js.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/uidriver/js/ui_js.go b/internal/uidriver/js/ui_js.go index 9afb412a7..8df5fcb70 100644 --- a/internal/uidriver/js/ui_js.go +++ b/internal/uidriver/js/ui_js.go @@ -98,6 +98,9 @@ func (u *UserInterface) SetFullscreen(fullscreen bool) { if !document.Truthy() { return } + if fullscreen == document.Get("fullscreenElement").Truthy() { + return + } if fullscreen { f := canvas.Get("requestFullscreen") if !f.Truthy() {