-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Problem
If you scroll on a scrollable element in the iOS simulator, all dioxus functions don't run.
Steps To Reproduce
Steps to reproduce the behavior:
- run the clock example on ios simulator
dx serve --example clock --ios- click on the screen and scroll up and down
- clock stops (and it shouldn't)
Expected behavior
The clock should continue to run while scrolling around
Screenshots
Simulator.Screen.Recording.-.iPhone.16e.-.2025-11-03.at.08.41.34.mov
Investigation
Although the clock is an easy minimal reproducible example, I did my investigation on my own app I am porting over from Vue. In my app, I expect a timer to fire every 0.5s.
Yet as seen in the above image, the dioxus entry point at index.html:1 is prevented from running over about 8s when I was scrolling. The dioxus entry point is what registers and then fires the timer. I originally thought the issue was with timers themselves, but it looks more like all of dioxus is blocked-off on the iOS simulator when scrolling
The above shows a little more of what is happening when scrolling. The purple bars are the timer firing every 0.5s. There is a clear gap when the timer stops firing. During this scrolling, there is a ton of these 'Composite' Layout & Rendering events happening, although the web inspector doesn't really give much detail on them.
With the vue project above, there doesn't appear to be an entry point which has to constantly be recalled for updates. Instead the timer registers and fires, where the fire also registers a new timer. And with tons of scrolling, we still the same many 'Composite' events here.
Environment:
- Dioxus version: 0.7.0
- dx version: dioxus 0.7.0 (ee25fcb)
- Rust version: rustc 1.91.0 (f8297e351 2025-10-28)
- OS info: Apple M4 Max 36 GB
- App platform: ios simulator (Version 26.0 (1057) SimulatorKit 947 CoreSimulator 1048) running iPhone 16e, iOS 26.0
Questionnaire
I'm interested in fixing this myself but don't know where to start.