Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolbar BUG occur after media dragging #2891

Open
Zum-Gluck opened this issue Jan 25, 2024 · 6 comments
Open

Toolbar BUG occur after media dragging #2891

Zum-Gluck opened this issue Jan 25, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@Zum-Gluck
Copy link
Contributor

Zum-Gluck commented Jan 25, 2024

Drag.mp4

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar
@Zum-Gluck Zum-Gluck added the bug Something isn't working label Jan 25, 2024
@hensuninnovation
Copy link

@Zum-Gluck I noticed the same issue. Do you have solution for this bug?

@hensuninnovation
Copy link

@Zum-Gluck After digging into the source code, I found that the toolbar was blocked by ScrollArea (zIndex 10000) from dnd plugin: https://github.com/udecode/plate/blob/main/packages/dnd/src/components/Scroller/ScrollArea.tsx#L24 You can disable it https://platejs.org/docs/dnd#enableScroller

@zbeyens
Copy link
Member

zbeyens commented Feb 13, 2024

Or call dndStore.set.isDragging(false) when that happens

@hensuninnovation
Copy link

Thank you @zbeyens! Any plan to fix this issue? It only happens when user drag and drop the selected content within visible area for example drag and drop text within the same line, then both top and low scroll areas are automatically removed.

@zbeyens
Copy link
Member

zbeyens commented Feb 13, 2024

No ETA but PR's welcome

@nklhtv
Copy link
Contributor

nklhtv commented Aug 16, 2024

The area of the page is not clickable becayse DnD renders the top and bottom scrollers with fixed position. I am temporarily disabling the scroller of DnD plugin.

createDndPlugin({
  options: { enableScroller: false },
})

The issue is caused by the DnD plugin handlers onDragStart and onDrop handlers are called when you drag & drop text, but onDragEnd is not.

The way this is handled in dragOverCursor is by reseting the store state in all 3 onDragLeave, onDragEnd & onDrop. Should that be adopted in DnD?
@zbeyens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants