File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,9 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
134
134
const name = ( e . target as HTMLElement ) . nodeName . toLowerCase ( ) ;
135
135
if ( skipMouseDown . find ( skip => skip === name ) ) return true ;
136
136
137
+ //for contenteditable
138
+ if ( ( e . target as HTMLElement ) . closest ( '[contenteditable="true"]' ) ) return true ;
139
+
137
140
// make sure we are clicking on a drag handle or child of it...
138
141
// Note: we don't need to check that's handle is an immediate child, as mouseHandled will prevent parents from also handling it (lowest wins)
139
142
//
@@ -153,8 +156,13 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
153
156
this . dragEl . addEventListener ( 'touchmove' , touchmove ) ;
154
157
this . dragEl . addEventListener ( 'touchend' , touchend ) ;
155
158
}
156
-
159
+
157
160
e . preventDefault ( ) ;
161
+
162
+ //e.preventDefault() prevents blur event which occurs just after mousedown event.
163
+ //if an editable content has focus, then blur must be call
164
+ if ( document . activeElement ) ( document . activeElement as HTMLElement ) . blur ( ) ;
165
+
158
166
DDManager . mouseHandled = true ;
159
167
return true ;
160
168
}
You can’t perform that action at this time.
0 commit comments