@@ -56,18 +56,6 @@ export class Mover {
5656 */
5757 oldGetGesture : ( ( e : PointerEvent ) => Gesture | null ) | null = null ;
5858
59- /**
60- * The stashed wouldDeleteDraggable function, which is sometimes replaced
61- * during a keyboard drag and is reset at the end of a keyboard drag.
62- */
63- oldWouldDeleteDraggable : ( ( ) => boolean ) | null = null ;
64-
65- /**
66- * The stashed shouldReturnToStart function, which is sometimes replaced
67- * during a keyboard drag and is reset at the end of a keyboard drag.
68- */
69- oldShouldReturnToStart : ( ( ) => boolean ) | null = null ;
70-
7159 /**
7260 * The block's base drag strategy, which will be overridden during
7361 * keyboard drags and reset at the end of the drag.
@@ -213,7 +201,6 @@ export class Mover {
213201
214202 this . unpatchWorkspace ( workspace ) ;
215203 this . unpatchDragStrategy ( info . block ) ;
216- this . unpatchDragger ( info . dragger as dragging . Dragger ) ;
217204 this . moves . delete ( workspace ) ;
218205 // Delay scroll until after block has finished moving.
219206 setTimeout ( ( ) => this . scrollCurrentBlockIntoView ( workspace ) , 0 ) ;
@@ -359,37 +346,15 @@ export class Mover {
359346 */
360347 private patchDragger ( dragger : dragging . Dragger , isNewBlock : boolean ) {
361348 if ( isNewBlock ) {
362- // @ts -expect-error dragger.wouldDeleteDraggable is private.
363- this . oldWouldDeleteDraggable = dragger . wouldDeleteDraggable ;
364349 // Monkey patch dragger to trigger delete.
365350 // eslint-disable-next-line @typescript-eslint/no-explicit-any
366351 ( dragger as any ) . wouldDeleteDraggable = ( ) => true ;
367352 } else {
368- // @ts -expect-error dragger.shouldReturnToStart is private.
369- this . oldShouldReturnToStart = dragger . shouldReturnToStart ;
370353 // Monkey patch dragger to trigger call to draggable.revertDrag.
371354 // eslint-disable-next-line @typescript-eslint/no-explicit-any
372355 ( dragger as any ) . shouldReturnToStart = ( ) => true ;
373356 }
374357 }
375-
376- /**
377- * Undo the monkeypatching of the block dragger.
378- *
379- * @param dragger The dragger to patch.
380- */
381- private unpatchDragger ( dragger : dragging . Dragger ) {
382- if ( this . oldWouldDeleteDraggable ) {
383- // @ts -expect-error dragger.wouldDeleteDraggable is private.
384- dragger . wouldDeleteDraggable = this . oldWouldDeleteDraggable ;
385- this . oldWouldDeleteDraggable = null ;
386- }
387- if ( this . oldShouldReturnToStart ) {
388- // @ts -expect-error dragger.shouldReturnToStart is private.
389- dragger . shouldReturnToStart = this . oldShouldReturnToStart ;
390- this . oldShouldReturnToStart = null ;
391- }
392- }
393358}
394359
395360/**
0 commit comments