[Webkit-unassigned] [Bug 278553] New: iframe's document not focusing when .focus() is called

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 22 22:11:44 PDT 2024


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

            Bug ID: 278553
           Summary: iframe's document not focusing when .focus() is called
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: marcosc at apple.com

There appears to be an issue with iframes not focusing when .focus() is called on them.

Test case:

```
window.onload = async function () {
    const iframes = document.querySelectorAll("iframe");

    for (let iframe of iframes) {
        await new Promise(resolve => {
            iframe.onload = resolve;
            iframe.src = "about:blank";
        });

        iframe.focus();
        console.assert(iframe.contentDocument.hasFocus(), "The iframe is not focused.");
    }
};
```

-- 
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/20240823/49884cc2/attachment.htm>


More information about the webkit-unassigned mailing list