From 36f2f53918f3d9fee8b7c05f051f24a86ab3834e Mon Sep 17 00:00:00 2001 From: matthewlipski Date: Tue, 30 Jul 2024 19:38:59 +0200 Subject: [PATCH] Changed drag preview CSS --- packages/core/src/editor/editor.css | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/core/src/editor/editor.css b/packages/core/src/editor/editor.css index 882424989c..f2040b7dba 100644 --- a/packages/core/src/editor/editor.css +++ b/packages/core/src/editor/editor.css @@ -62,7 +62,19 @@ Tippy popups that are appended to document.body directly .bn-drag-preview { position: absolute; - z-index: -1; + top: 0; + left: 0; + padding: 10px; + /* Sort of a hack but seems like the most reliable solution. */ + /* Drag preview element needs to be within bounds of the document area or it + won't work in some cases. */ + /* Negative z-index covers most cases, but the element can still be visible + if UI elements are translucent. */ + /* Setting opacity has no effect on the drag preview but does affect the + element. Unless it's set to 0, in which case the drag preview also becomes + hidden. So setting it to an extremely low value instead makes the element + functionally invisible while not affecting the drag preview itself. */ + opacity: 0.001; } /* Give a remote user a caret */