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

Bug: DropZone can-drop styles can cause flickering during drag #1857

Open
dave-gcv opened this issue Dec 16, 2024 · 2 comments
Open

Bug: DropZone can-drop styles can cause flickering during drag #1857

dave-gcv opened this issue Dec 16, 2024 · 2 comments

Comments

@dave-gcv
Copy link

I have noticed that under certain circumstances the can-drop css style that gets applied to drop zones can quickly toggle off/on during drag operations. This can cause flickering issues when using the css class to apply custom styles.

It seems to occur when there are already items in the target zone and you drag an item over any of the current items. Behaviour is ok and as expected when dragging the item in the zone where there is empty space. This is reproducable on the demo page https://blazor.radzen.com/dropzone

You can see from the uploaded video clip the class changes in the developer console during drag.

dropzone.mp4
@dave-gcv
Copy link
Author

Seems very similar to this Stackoverflow issue from a few years back:
https://stackoverflow.com/questions/7110353/html5-dragleave-fired-when-hovering-a-child-element

@dave-gcv
Copy link
Author

Update : I don't know if it's related but I've also noticed that the ItemSelector event gets fired continuously while hovering over a dropzone.

I was under the impression that this event was only used upon initialisation of the component (or when a drop is completed) in order to determine the which zone an item belongs to? Seems that if this is alway firing it's a potential bottleneck/cause of lag
or the apparent bouncing between the "can-drop" / "no-drop" classes being removed and applied etc

As you can see from the attached screen recording, the longer you hover over the dropzone (without dropping) the event is fired. When eventually released there is a noticable delay before the UI catches up

dropzone2.mp4

@dave-gcv dave-gcv changed the title DropZone can-drop styles can cause flickering during drag Bug: DropZone can-drop styles can cause flickering during drag Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant