Skip to content

Commit d9562a2

Browse files
fix: Drag preview issues (#905)
* Changed drag preview position from `left: -100000px;` to `z-index: -1;` * Fixed `appendChild` being called instead of `removeChild`
1 parent 9b624a0 commit d9562a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/core/src/editor/editor.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Tippy popups that are appended to document.body directly
6262

6363
.bn-drag-preview {
6464
position: absolute;
65-
left: -100000px;
65+
z-index: -1;
6666
}
6767

6868
/* Give a remote user a caret */

packages/core/src/extensions/SideMenu/SideMenuPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function unsetDragImage(rootEl: Document | ShadowRoot) {
158158
if (rootEl instanceof ShadowRoot) {
159159
rootEl.removeChild(dragImageElement);
160160
} else {
161-
rootEl.body.appendChild(dragImageElement);
161+
rootEl.body.removeChild(dragImageElement);
162162
}
163163

164164
dragImageElement = undefined;

0 commit comments

Comments
 (0)