Skip to content

Commit a14303f

Browse files
committed
fix(datetime): improving detection logic
1 parent 212cecf commit a14303f

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

core/src/components/datetime/datetime.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,15 +1171,11 @@ export class Datetime implements ComponentInterface {
11711171
* datetime is visible but the host clearly has layout, ensure
11721172
* we still initialize listeners and mark the component as ready.
11731173
*
1174-
* We schedule this a couple of frames after load so that any
1175-
* initial layout/animations (such as a parent modal presenting)
1176-
* have had a chance to run.
1174+
* We schedule this after everything has had a chance to run.
11771175
*/
1178-
raf(() => {
1179-
raf(() => {
1180-
this.ensureReadyIfVisible();
1181-
});
1182-
});
1176+
setTimeout(() => {
1177+
this.ensureReadyIfVisible();
1178+
}, 100);
11831179

11841180
/**
11851181
* We need to clean up listeners when the datetime is hidden

0 commit comments

Comments
 (0)