@@ -124,14 +124,6 @@ export class Datetime implements ComponentInterface {
124124 private destroyCalendarListener ?: ( ) => void ;
125125 private destroyKeyboardMO ?: ( ) => void ;
126126
127- /**
128- * Tracks the current visibility state of the datetime component.
129- * This prevents race conditions when the datetime rapidly becomes visible/hidden
130- * (e.g., when dragging a modal on iOS), ensuring the datetime-ready class
131- * accurately reflects the component's current intersection state.
132- */
133- private isIntersecting = false ;
134-
135127 // TODO(FW-2832): types (DatetimeParts causes some errors that need untangling)
136128 private minParts ?: any ;
137129 private maxParts ?: any ;
@@ -1156,13 +1148,6 @@ export class Datetime implements ComponentInterface {
11561148 return ;
11571149 }
11581150
1159- /**
1160- * Track that the component is now intersecting.
1161- * This prevents stale writeTask operations from incorrectly
1162- * removing the datetime-ready class.
1163- */
1164- this . isIntersecting = true ;
1165-
11661151 this . initializeListeners ( ) ;
11671152
11681153 /**
@@ -1174,14 +1159,7 @@ export class Datetime implements ComponentInterface {
11741159 * is a better way to handle this?
11751160 */
11761161 writeTask ( ( ) => {
1177- /**
1178- * Only add the class if the component is still intersecting.
1179- * This prevents race conditions when the visibility state changes
1180- * rapidly (e.g., when dragging a modal on iOS).
1181- */
1182- if ( this . isIntersecting ) {
1183- this . el . classList . add ( 'datetime-ready' ) ;
1184- }
1162+ this . el . classList . add ( 'datetime-ready' ) ;
11851163 } ) ;
11861164 } ;
11871165 const visibleIO = new IntersectionObserver ( visibleCallback , { threshold : 0.01 , root : el } ) ;
@@ -1219,13 +1197,6 @@ export class Datetime implements ComponentInterface {
12191197 return ;
12201198 }
12211199
1222- /**
1223- * Track that the component is no longer intersecting.
1224- * This prevents stale writeTask operations from incorrectly
1225- * adding the datetime-ready class.
1226- */
1227- this . isIntersecting = false ;
1228-
12291200 this . destroyInteractionListeners ( ) ;
12301201
12311202 /**
@@ -1238,14 +1209,7 @@ export class Datetime implements ComponentInterface {
12381209 this . showMonthAndYear = false ;
12391210
12401211 writeTask ( ( ) => {
1241- /**
1242- * Only remove the class if the component is still not intersecting.
1243- * This prevents race conditions when the visibility state changes
1244- * rapidly (e.g., when dragging a modal on iOS).
1245- */
1246- if ( ! this . isIntersecting ) {
1247- this . el . classList . remove ( 'datetime-ready' ) ;
1248- }
1212+ this . el . classList . remove ( 'datetime-ready' ) ;
12491213 } ) ;
12501214 } ;
12511215 const hiddenIO = new IntersectionObserver ( hiddenCallback , { threshold : 0 , root : el } ) ;
0 commit comments