@@ -55,18 +55,6 @@ export class Mover {
5555 */
5656 oldGetGesture : ( ( e : PointerEvent ) => Gesture | null ) | null = null ;
5757
58- /**
59- * The stashed wouldDeleteDraggable function, which is sometimes replaced
60- * during a keyboard drag and is reset at the end of a keyboard drag.
61- */
62- oldWouldDeleteDraggable : ( ( ) => boolean ) | null = null ;
63-
64- /**
65- * The stashed shouldReturnToStart function, which is sometimes replaced
66- * during a keyboard drag and is reset at the end of a keyboard drag.
67- */
68- oldShouldReturnToStart : ( ( ) => boolean ) | null = null ;
69-
7058 /**
7159 * The block's base drag strategy, which will be overridden during
7260 * keyboard drags and reset at the end of the drag.
@@ -208,7 +196,6 @@ export class Mover {
208196
209197 this . unpatchWorkspace ( workspace ) ;
210198 this . unpatchDragStrategy ( info . block ) ;
211- this . unpatchDragger ( info . dragger as dragging . Dragger ) ;
212199 this . moves . delete ( workspace ) ;
213200 // Delay scroll until after block has finished moving.
214201 setTimeout ( ( ) => this . scrollCurrentBlockIntoView ( workspace ) , 0 ) ;
@@ -354,37 +341,15 @@ export class Mover {
354341 */
355342 private patchDragger ( dragger : dragging . Dragger , isNewBlock : boolean ) {
356343 if ( isNewBlock ) {
357- // @ts -expect-error dragger.wouldDeleteDraggable is private.
358- this . oldWouldDeleteDraggable = dragger . wouldDeleteDraggable ;
359344 // Monkey patch dragger to trigger delete.
360345 // eslint-disable-next-line @typescript-eslint/no-explicit-any
361346 ( dragger as any ) . wouldDeleteDraggable = ( ) => true ;
362347 } else {
363- // @ts -expect-error dragger.shouldReturnToStart is private.
364- this . oldShouldReturnToStart = dragger . shouldReturnToStart ;
365348 // Monkey patch dragger to trigger call to draggable.revertDrag.
366349 // eslint-disable-next-line @typescript-eslint/no-explicit-any
367350 ( dragger as any ) . shouldReturnToStart = ( ) => true ;
368351 }
369352 }
370-
371- /**
372- * Undo the monkeypatching of the block dragger.
373- *
374- * @param dragger The dragger to patch.
375- */
376- private unpatchDragger ( dragger : dragging . Dragger ) {
377- if ( this . oldWouldDeleteDraggable ) {
378- // @ts -expect-error dragger.wouldDeleteDraggable is private.
379- dragger . wouldDeleteDraggable = this . oldWouldDeleteDraggable ;
380- this . oldWouldDeleteDraggable = null ;
381- }
382- if ( this . oldShouldReturnToStart ) {
383- // @ts -expect-error dragger.shouldReturnToStart is private.
384- dragger . shouldReturnToStart = this . oldShouldReturnToStart ;
385- this . oldShouldReturnToStart = null ;
386- }
387- }
388353}
389354
390355/**
0 commit comments