RESOLVED DUPLICATE of bug 285811286146
Clicking a textarea inside an open popover in mobile Safari causes the page to become unresponsive.
https://bugs.webkit.org/show_bug.cgi?id=286146
Summary Clicking a textarea inside an open popover in mobile Safari causes the page t...
Steve
Reported 2025-01-17 08:21:33 PST
Created attachment 473932 [details] The issue in action on an iPhone. Clicking a textarea inside an open popover causes the page to become unresponsive. A demo with an HTML example can be seen here: https://sledsworth.com/posts/2024/safari-popover-woes/#text-area-issue If you are using mobile Safari, after clicking on the textarea inside the popover the whole page becomes unresponsive (besides scrolling). The popover cannot be closed, no buttons can be pressed, and some of the page isn't rendered anymore.
Attachments
The issue in action on an iPhone. (54.40 MB, video/mp4)
2025-01-17 08:21 PST, Steve
no flags
Radar WebKit Bug Importer
Comment 1 2025-01-17 12:08:58 PST
Simon Fraser (smfr)
Comment 2 2025-01-17 14:57:14 PST
We're hanging under: + 890 WebCore::Element::dispatchFocusEvent(WTF::RefPtr<WebCore::Element, WTF::RawPtrTraits<WebCore::Element>, WTF::DefaultRefDerefTraits<WebCore::Element>>&&, WebCore::FocusOptions const&) (in WebCore) + 140 [0x19ab265d0] + 890 WebKit::WebChromeClient::elementDidFocus(WebCore::Element&, WebCore::FocusOptions const&) (in WebKit) + 72 [0x19cc36b88] + 890 WebKit::WebPage::elementDidFocus(WebCore::Element&, WebCore::FocusOptions const&) (in WebKit) + 408 [0x19ce10050] + 890 WebKit::WebPage::focusedElementInformation() (in WebKit) + 908 [0x19c9a63ec] + 890 WebKit::nextAssistableElement(WebCore::Node*, WebCore::Page&, bool) (in WebKit) + 132 [0x19c9bdb10] + 890 WebCore::FocusController::nextFocusableElement(WebCore::Node&) (in WebCore) + 56 [0x19b276c58] + 885 WebCore::FocusController::findFocusableElementAcrossFocusScope(WebCore::FocusDirection, WebCore::FocusNavigationScope const&, WebCore::Node*, WebCore::KeyboardEvent*) (in WebCore) + 1408 [0x19b274e74] + ! 884 WebCore::FocusController::findFocusableElementWithinScope(WebCore::FocusDirection, WebCore::FocusNavigationScope const&, WebCore::Node*, WebCore::KeyboardEvent*) (in WebCore) + 52 [0x19b2736d0] + ! : 874 WebCore::FocusController::nextFocusableElementWithinScope(WebCore::FocusNavigationScope const&, WebCore::Node*, WebCore::KeyboardEvent*) (in WebCore) + 1120 [0x19b275844] + ! : | 374 WebCore::FocusController::findElementWithExactTabIndex(WebCore::FocusNavigationScope const&, WebCore::Node*, int, WebCore::KeyboardEvent*, WebCore::FocusDirection) (in WebCore) + 360 [0x19b276a40] + ! : | + 127 WebCore::FocusNavigationScope::nextInScope(WebCore::Node const*) const (in WebCore) + 28,244,... [0x19b27233c,0x19b272414,...] + ! : | + 115 WebCore::FocusNavigationScope::nextInScope(WebCore::Node const*) const (in WebCore) + 244 [0x19b272414] + ! : | + ! 115 WebCore::FocusNavigationScope::nextSiblingInScope(WebCore::Node const&) const (in WebCore) + 24,188,... [0x19b271e88,0x19b271f2c,...]
Tim Nguyen (:ntim)
Comment 3 2025-01-17 16:28:45 PST
The same hang reproduces when you focus the textarea on macOS and then tab forwards or backwards.
Tim Nguyen (:ntim)
Comment 4 2025-01-17 16:51:57 PST
*** This bug has been marked as a duplicate of bug 285811 ***
Tim Nguyen (:ntim)
Comment 5 2025-01-22 20:57:05 PST
PR is up here fyi: https://github.com/WebKit/WebKit/pull/39433 In case you need a workaround, just make sure to put a focusable element next to the invoker (`<button tabindex=0></button>`), which will be enough to prevent the hang. Sorry for the inconvenience!
Steve
Comment 6 2025-01-23 06:38:08 PST
No worries, thanks for the quick turnaround! I moved to use <dialog> for my particular case, but I will look into reverting to popover once this lands in Safari. Thanks again, Tim!
Note You need to log in before you can comment on or make changes to this bug.