Bug 259684 - Overflow element non-interactive after removing inert attribute
Summary: Overflow element non-interactive after removing inert attribute
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad iOS 16
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-01 07:25 PDT by Dan Palmer
Modified: 2023-08-17 21:38 PDT (History)
3 users (show)

See Also:


Attachments
HTML file with usecase (4.12 KB, text/html)
2023-08-01 07:25 PDT, Dan Palmer
no flags Details
Testcase using pointer-events (4.24 KB, text/html)
2023-08-09 16:28 PDT, Tim Nguyen (:ntim)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Palmer 2023-08-01 07:25:03 PDT
Created attachment 467165 [details]
HTML file with usecase

Overview: Applying inert to an element with overflow:scroll, and then removing the inert attribute, still keeps it non-interactive.

Steps to Reproduce:

1) Create an element with overflow:scroll, height:200px and inert.

2) Add some paragraphs of text within the element.

3) Create a button that when clicked will remove the inert attribute from the element.

4) Load the page.

Actual Results:

No scrolling on the element. Click the button to remove inert. Element still does not scroll.

Expected Results: 

After clicking the button to remove inert, the element should scroll.

Build Date & Hardware:

iPhone Useragent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.2 Mobile/15E148 Safari/604.1

Additional Information: 

If you include a second overflow:scroll element below the first and scroll it after you have removed inert from the first, scrolling on the first becomes possible again.
Comment 1 Radar WebKit Bug Importer 2023-08-01 18:08:39 PDT
<rdar://problem/113239461>
Comment 2 Tim Nguyen (:ntim) 2023-08-09 16:28:50 PDT
Created attachment 467233 [details]
Testcase using pointer-events
Comment 3 Tim Nguyen (:ntim) 2023-08-09 16:34:20 PDT
This bug is specific to inert. Probably just needs a special check here: https://searchfox.org/wubkat/rev/33c49ff64449389431294ba0ace6f7d0ad6306b7/Source/WebCore/rendering/style/RenderStyle.cpp#1350-1351
Comment 4 Simon Fraser (smfr) 2023-08-09 18:29:12 PDT
I think we have some UIScrollView-specific code that deals with interactivity too.
Comment 5 Tim Nguyen (:ntim) 2023-08-09 19:08:49 PDT
(In reply to Simon Fraser (smfr) from comment #4)
> I think we have some UIScrollView-specific code that deals with
> interactivity too.

Given this doesn't reproduce with pointer-events, it probably just needs the same treatment as pointerEvents here.
Comment 6 Tim Nguyen (:ntim) 2023-08-17 12:50:31 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16800
Comment 7 EWS 2023-08-17 21:38:42 PDT
Committed 267030@main (cd37141f0b59): <https://commits.webkit.org/267030@main>

Reviewed commits have been landed. Closing PR #16800 and removing active labels.