Bug 260443 - Kinetic scrolling stops after elements are slotted
Summary: Kinetic scrolling stops after elements are slotted
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad iOS 16
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-20 06:31 PDT by Steve Orvell
Modified: 2023-08-27 06:32 PDT (History)
2 users (show)

See Also:


Attachments
Scrolling freezes after scrolling horizontally inside the top bordered container on iOS/iPadOS (1.84 KB, text/plain)
2023-08-20 06:31 PDT, Steve Orvell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Orvell 2023-08-20 06:31:53 PDT
Created attachment 467346 [details]
Scrolling freezes after scrolling horizontally inside the top bordered container on iOS/iPadOS

Setup: 
1. An element has a shadowRoot with a <slot> in it.
2. The element is scrollable.
3. A child element is appended and slotted to the <slot> *while* the element is scrolling. 

Expected: 
* The element continues to scroll after the child is appended.
Actual: 
* The element immediately stops scrolling after the child is appended.

Reproduction:

* Scroll horizontally inside each bordered container.
* Note, this issue occurs only on iOS/iPadOS.

The attached reproduction shows the *incorrect* behavior when a child is appended and slotted, and it also shows the *expected* behavior when a child is appended to the shadowRoot itself rather than slotted. The reproduction is also available at https://lit.dev/playground/#gist=05deaacf5ba04c069cc41b9d523b636b&view-mode=preview.
Comment 1 Simon Fraser (smfr) 2023-08-21 09:50:42 PDT
Does this happen with equivalent DOM mutations that don't involve slots?
Comment 2 Steve Orvell 2023-08-21 09:53:00 PDT
No, when the mutation does not involve slotting, scrolling works as expected. See the explanation of the repro at the end of the initial report.
Comment 3 Radar WebKit Bug Importer 2023-08-27 06:32:12 PDT
<rdar://problem/114523840>