@@ -693,13 +693,8 @@ function RemoteFunctions(config) {
693
693
marker . className = indicatorType === "vertical" ? DROP_MARKER_VERTICAL_CLASSNAME : DROP_MARKER_CLASSNAME ;
694
694
}
695
695
696
- // position the marker at the top or bottom of the element
697
696
let rect = element . getBoundingClientRect ( ) ;
698
- let scrollTop = window . pageYOffset || document . documentElement . scrollTop ;
699
- let scrollLeft = window . pageXOffset || document . documentElement . scrollLeft ;
700
-
701
- // base marker styling
702
- marker . style . position = "absolute" ;
697
+ marker . style . position = "fixed" ;
703
698
marker . style . zIndex = "2147483646" ;
704
699
marker . style . borderRadius = "2px" ;
705
700
marker . style . pointerEvents = "none" ;
@@ -708,8 +703,8 @@ function RemoteFunctions(config) {
708
703
// inside marker - outline around the element
709
704
marker . style . border = "1px dashed #4285F4" ;
710
705
marker . style . backgroundColor = "rgba(66, 133, 244, 0.05)" ;
711
- marker . style . left = rect . left + scrollLeft + "px" ;
712
- marker . style . top = rect . top + scrollTop + "px" ;
706
+ marker . style . left = rect . left + "px" ;
707
+ marker . style . top = rect . top + "px" ;
713
708
marker . style . width = rect . width + "px" ;
714
709
marker . style . height = rect . height + "px" ;
715
710
marker . style . animation = "insideMarkerPulse 1s ease-in-out infinite alternate" ;
@@ -723,23 +718,23 @@ function RemoteFunctions(config) {
723
718
// Vertical marker (for flex row containers)
724
719
marker . style . width = "2px" ;
725
720
marker . style . height = rect . height + "px" ;
726
- marker . style . top = rect . top + scrollTop + "px" ;
721
+ marker . style . top = rect . top + "px" ;
727
722
728
723
if ( dropZone === "after" ) {
729
- marker . style . left = rect . right + scrollLeft + 3 + "px" ;
724
+ marker . style . left = rect . right + 3 + "px" ;
730
725
} else {
731
- marker . style . left = rect . left + scrollLeft - 5 + "px" ;
726
+ marker . style . left = rect . left - 5 + "px" ;
732
727
}
733
728
} else {
734
729
// Horizontal marker (for block/grid containers)
735
730
marker . style . width = rect . width + "px" ;
736
731
marker . style . height = "2px" ;
737
- marker . style . left = rect . left + scrollLeft + "px" ;
732
+ marker . style . left = rect . left + "px" ;
738
733
739
734
if ( dropZone === "after" ) {
740
- marker . style . top = rect . bottom + scrollTop + 3 + "px" ;
735
+ marker . style . top = rect . bottom + 3 + "px" ;
741
736
} else {
742
- marker . style . top = rect . top + scrollTop - 5 + "px" ;
737
+ marker . style . top = rect . top - 5 + "px" ;
743
738
}
744
739
}
745
740
}
0 commit comments