File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
packages/plugins/plugin-block/src Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -108,13 +108,15 @@ export class BlockService {
108108 dom . addEventListener ( 'mousedown' , this . #handleMouseDown)
109109 dom . addEventListener ( 'mouseup' , this . #handleMouseUp)
110110 dom . addEventListener ( 'dragstart' , this . #handleDragStart)
111+ dom . addEventListener ( 'dragend' , this . #handleDragEnd)
111112 }
112113
113114 /// Remove mouse event to the dom.
114115 removeEvent = ( dom : HTMLElement ) => {
115116 dom . removeEventListener ( 'mousedown' , this . #handleMouseDown)
116117 dom . removeEventListener ( 'mouseup' , this . #handleMouseUp)
117118 dom . removeEventListener ( 'dragstart' , this . #handleDragStart)
119+ dom . removeEventListener ( 'dragend' , this . #handleDragEnd)
118120 }
119121
120122 /// Unbind the notify function.
@@ -171,6 +173,13 @@ export class BlockService {
171173 }
172174 }
173175
176+ /// @internal
177+ #handleDragEnd = ( ) => {
178+ if ( this . #view) {
179+ this . #dragEnd( this . #view)
180+ }
181+ }
182+
174183 /// @internal
175184 keydownCallback = ( view : EditorView ) => {
176185 this . #hide( )
You can’t perform that action at this time.
0 commit comments