RESOLVED FIXED296056
iPadOS 26: Safari extension popup windows open scrolled down
https://bugs.webkit.org/show_bug.cgi?id=296056
Summary iPadOS 26: Safari extension popup windows open scrolled down
Jeff Johnson
Reported 2025-07-16 07:30:00 PDT
Created attachment 476047 [details] Screen recording of Safari 26 extension popup windows When I open my Safari extension popup windows on iPadOS 26, the windows are scrolled down a little instead of showing the top. This did not occur on iPadOS 18 and earlier. See the attached screen recording. There are the example extensions shown: https://apps.apple.com/app/stopthemadness-pro/id6471380298 https://apps.apple.com/app/changetheheaders-for-safari/id6743129567
Attachments
Screen recording of Safari 26 extension popup windows (3.68 MB, video/mp4)
2025-07-16 07:30 PDT, Jeff Johnson
no flags
Radar WebKit Bug Importer
Comment 1 2025-07-16 07:30:13 PDT
Timothy Hatcher
Comment 2 2025-07-21 12:43:10 PDT
I can't reproduce on the latest seed.
Jeff Johnson
Comment 3 2025-07-21 16:41:04 PDT
(In reply to Timothy Hatcher from comment #2) > I can't reproduce on the latest seed. Which build # does this refer to?
Jeff Johnson
Comment 4 2025-07-22 11:09:50 PDT
This bug still exists in iPadOS 26 beta 4 released today.
Jeff Johnson
Comment 5 2025-07-22 13:36:38 PDT
I can't find anything in Settings that would be relevant, but I do find that the bug occurs only in portrait orientation, not in landscape orientation.
Timothy Hatcher
Comment 6 2025-07-23 13:59:32 PDT
I was referring to seed 4. I can't reproduce on seed 4 in portrait or landscape orientation.
Timothy Hatcher
Comment 7 2025-07-23 14:41:10 PDT
I am able to reproduce when inspecting the popover, and refreshing it. It seems to be due to: <dialog id="loadingDialog"> <p>Loading&hellip;</p> </dialog> That dialog is quickly being shown and hidden once settings are received in a message. If the message is fast enough, it does not reproduce. When: document.getElementById("loadingDialog").close(); Is called the first <select> in the page gets focus and some scrolling occurs, even though the preventScroll = true option is used. if (RefPtr element = std::exchange(m_previouslyFocusedElement, nullptr).get()) { FocusOptions options; options.preventScroll = true; element->focus(options); }
Jeff Johnson
Comment 8 2025-07-23 17:10:32 PDT
My other extension ChangeTheHeaders also shows a dialog on load, while it's fetching the extension settings from the background script. Curiously, the value of window.scrollY on load is exactly 51 in both extension popup windows, despite their vastly different HTML element layout.
Jeff Johnson
Comment 9 2025-07-23 17:52:46 PDT
Setting a breakpoint, it appears that the scrolling actually occurs before document.getElementById("loadingDialog").close() and thus before document.getElementById("websiteProtections").focus({preventScroll: true}) too. The scrolling occurs sometime after document.getElementById("loadingDialog").showModal()
Aditya Keerthi
Comment 10 2025-09-08 16:05:21 PDT
EWS
Comment 11 2025-09-09 11:25:59 PDT
Committed 299762@main (acd5bf8f6c49): <https://commits.webkit.org/299762@main> Reviewed commits have been landed. Closing PR #50467 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.