fix: Drag preview blocking drops when overlapping the editor (BLO-996)#2670
fix: Drag preview blocking drops when overlapping the editor (BLO-996)#2670matthewlipski merged 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe CSS styling for the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
|
I would double check safari & firefox for this just to be sure it doesn't mess anything up |
|
Looks like drag previews in Safari and Firefox are not working either way (on main also), so I'll make a separate issue for this. |
Summary
When dragging & dropping a block, an invisible HTML element is added to the DOM to set as the drag preview image.
Depending on the size of the dragged block and the position of the editor, this element may overlap with the editor HTML element, blocking the user from dropping the block anywhere covered by the preview element.
This PR fixes that by adding
pointer-events: none;to the preview element CSS.Closes #2369
Rationale
This is a bug, and it's especially unclear to the user why they cannot drop blocks in certain places.
Changes
See above.
Impact
N/A
Testing
N/A
Screenshots/Video
N/A
Checklist
Additional Notes
N/A
Summary by CodeRabbit