[Webkit-unassigned] [Bug 229139] New: [GTK][WPE] document.hasFocus() returns true for hidden tabs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 16 07:33:20 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=229139

            Bug ID: 229139
           Summary: [GTK][WPE] document.hasFocus() returns true for hidden
                    tabs
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Keywords: Gtk
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cgarcia at igalia.com
                CC: bugs-noreply at webkitgtk.org, cdumez at apple.com,
                    youennf at gmail.com

Created attachment 435599

  --> https://bugs.webkit.org/attachment.cgi?id=435599&action=review

Test

This can be reproduced with the attached test, the web view title shows whether the document has the focus or not at any time. Move the focus to a new tab in MiniBrowser to see that it remains true for the hidden tab. The problem is that we are always claiming to have the focus when the web view is in the active window. This is not happening in safari, but I don't understand why. I noticed this because ikea.com website stores the active widget in localstorage using document.hasFocus(). When opening multiple tabs it starts writing local storage like crazy making the network and web processes consume 100% cpu. It doesn't happen when using multiple windows instead of tabs, because in that case only the tab in the active window returns true for document.hasFocus().

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210816/0a424a22/attachment-0001.htm>


More information about the webkit-unassigned mailing list