File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,8 @@ const dndHandlers = ({ sessionSettings, setSessionSettings }: DragTracker) => {
109109 if ( dragContext ) {
110110 event . preventDefault ( ) ;
111111
112- const visualLine = view . lineBlockAtHeight (
113- event . y - view . documentTop || event . clientY - view . documentTop
114- ) ;
112+ const height = ( event . y || event . clientY ) - view . documentTop ;
113+ const visualLine = view . lineBlockAtHeight ( height ) ;
115114 const line = view . state . doc . lineAt ( visualLine . from ) ;
116115
117116 if ( line . number !== lastDragPos ?. line ) {
@@ -191,9 +190,8 @@ const dndHandlers = ({ sessionSettings, setSessionSettings }: DragTracker) => {
191190 clearSuppressChildDragEnterLeave ( view ) ;
192191 event . preventDefault ( ) ;
193192
194- const visualLine = view . lineBlockAtHeight (
195- event . y - view . documentTop || event . clientY - view . documentTop
196- ) ;
193+ const height = ( event . y || event . clientY ) - view . documentTop ;
194+ const visualLine = view . lineBlockAtHeight ( height ) ;
197195 const line = view . state . doc . lineAt ( visualLine . from ) ;
198196
199197 revertPreview ( view ) ;
You can’t perform that action at this time.
0 commit comments