Skip to content

Commit ae343da

Browse files
committed
draggable.DragProxyComponent: disable pointer events globally in case the body contains .neo-is-dragging #6330
1 parent 5f644f0 commit ae343da

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

resources/scss/src/draggable/DragProxyComponent.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
body:has(.neo-is-dragging) {
2+
cursor: move !important;
3+
4+
// We can not put pointer-events: none on the same level as cursor, since it prevents cursor changes
5+
* {
6+
pointer-events: none !important;
7+
}
8+
}
9+
110
.neo-dragproxy {
211
pointer-events : none;
312
position : absolute !important;

src/main/addon/DragDrop.mjs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,6 @@ class DragDrop extends Base {
203203
parsedEvent = me.getEventData(event),
204204
isDrop = me.pathIncludesDropZone(parsedEvent.targetPath);
205205

206-
DomAccess.setBodyCls({
207-
remove: ['neo-unselectable']
208-
});
209-
210206
if (me.bodyCursorStyle) {
211207
DomAccess.setStyle({
212208
id : 'document.body',
@@ -321,10 +317,6 @@ class DragDrop extends Base {
321317
let me = this,
322318
rect = event.target.getBoundingClientRect();
323319

324-
DomAccess.setBodyCls({
325-
add: ['neo-unselectable']
326-
});
327-
328320
Object.assign(me, {
329321
dragProxyRect: rect,
330322
offsetX : event.detail.clientX - rect.left,

0 commit comments

Comments
 (0)