Skip to content

Commit 665f908

Browse files
committed
style(select): include more info in comment
1 parent 7cd8d0e commit 665f908

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/src/components/select/select.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,12 @@ export class Select implements ComponentInterface {
372372
} else if (this.interface === 'popover') {
373373
overlay.addEventListener('ionPopoverWillPresent', scrollSelectedIntoView, { once: true });
374374
} else {
375-
// For alerts and action sheets, we need to wait a frame after willPresent
375+
/**
376+
* For alerts and action sheets, we need to wait a frame after willPresent
377+
* because these overlays don't have their content in the DOM immediately
378+
* when willPresent fires. By waiting a frame, we ensure the content is
379+
* rendered and can be properly scrolled into view.
380+
*/
376381
const scrollAfterRender = () => {
377382
requestAnimationFrame(() => {
378383
scrollSelectedIntoView();

0 commit comments

Comments
 (0)