Skip to content

Commit 4a3b1cd

Browse files
Changed drag preview CSS (#976)
1 parent 310569c commit 4a3b1cd

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

packages/core/src/editor/editor.css

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

6363
.bn-drag-preview {
6464
position: absolute;
65-
z-index: -1;
65+
top: 0;
66+
left: 0;
67+
padding: 10px;
68+
/* Sort of a hack but seems like the most reliable solution. */
69+
/* Drag preview element needs to be within bounds of the document area or it
70+
won't work in some cases. */
71+
/* Negative z-index covers most cases, but the element can still be visible
72+
if UI elements are translucent. */
73+
/* Setting opacity has no effect on the drag preview but does affect the
74+
element. Unless it's set to 0, in which case the drag preview also becomes
75+
hidden. So setting it to an extremely low value instead makes the element
76+
functionally invisible while not affecting the drag preview itself. */
77+
opacity: 0.001;
6678
}
6779

6880
/* Give a remote user a caret */

0 commit comments

Comments
 (0)