fix(datetime): re-emit wheel ionScrollStart/ionScrollEnd from picker columns - #30674
Open
vunizhona wants to merge 2 commits into
Open
fix(datetime): re-emit wheel ionScrollStart/ionScrollEnd from picker columns#30674vunizhona wants to merge 2 commits into
vunizhona wants to merge 2 commits into
Conversation
re-emit ionScrollStart/ionScrollEnd from wheel columns on ion-datetime by capturing inner ion-picker-column events and suppressing originals; coalesce multiple concurrent column scrolls into a single start/end with a 300ms end debounce add ionScrollStart/ionScrollEnd to ion-picker-column and emit at scroll start/end update API/types and Angular/Vue proxies to expose new events stabilize prefer-wheel specs by replacing fake timers with real waits to avoid newSpecPage timeouts closes ionic-team#30449
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2 tasks
pull Bot
pushed a commit
to Zezo-Ai/ionic-framework
that referenced
this pull request
Aug 21, 2026
Issue number: resolves ionic-team#30449 --------- ## What is the current behavior? `ion-picker-column` commits the centered option on a 250ms idle timer that only starts once the wheel stops moving. Flick a wheel and tap a Save button while it's still coasting, and the click handler reads the previous value. On an `ion-datetime` with `preferWheel`, the wheel shows one date while `value` still reports another. ## What is the new behavior? During a scroll the user started, the column watches for `pointerdown` anywhere outside itself. On that press it halts the wheel on the option under the highlight and commits it synchronously, so an application's own click handler reads the value the user can see. A press on a sibling wheel in the same picker is exempt, so reaching for the next column leaves the first one coasting. The datetime wheel handlers now read the working and active parts at event time, because an outside press settles every coasting column in one synchronous dispatch and the previous render-time reads clobbered each other. ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information The community PR for this issue, ionic-team#30674, was a great attempt, but it takes the reporter's other suggestion and adds public `ionScrollStart` and `ionScrollEnd` events to `ion-picker-column` and `ion-datetime`. I didn't go that way for two reasons. It's permanent public API on two components plus the Angular and Vue proxies, carried by every consumer forever, to work around a bug. More importantly it doesn't fix the stale value: every app has to write the disable-Save logic itself, and its `ionScrollEnd` is debounced 300ms after the wheel settles, so a tap during the flick still reads the old value at the moment the click handler runs. Committing on `pointerdown` fixes existing apps with no code change. The scroll events are a fair feature request on their own, just a separate one from this bug fix. Preview: - Picker column scroll: [iOS](https://ionic-framework-git-fw-7706-ionic1.vercel.app/src/components/picker-column/test/scroll?ionic:mode=ios) / [MD](https://ionic-framework-git-fw-7706-ionic1.vercel.app/src/components/picker-column/test/scroll?ionic:mode=md) - Datetime prefer-wheel: [iOS](https://ionic-framework-git-fw-7706-ionic1.vercel.app/src/components/datetime/test/prefer-wheel?ionic:mode=ios) / [MD](https://ionic-framework-git-fw-7706-ionic1.vercel.app/src/components/datetime/test/prefer-wheel?ionic:mode=md)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number: resolves #30449
What is the current behavior?
Wheel scrolling inside ion-datetime does not provide host-level lifecycle events for app code to react to start/end of scrolling.
What is the new behavior?
Does this introduce a breaking change?
Other information
Verification
Targeted specs: cd core && npm ci && npm run test.spec -- src/components/datetime/test/prefer-wheel/datetime.spec.ts (expect 3 passed).
Manual: cd core && npm start, open /src/components/datetime/test/prefer-wheel/index.html.
Scroll a wheel column: app receives one ionScrollStart at the beginning, one ionScrollEnd after settling.