-
Notifications
You must be signed in to change notification settings - Fork 1.1k
A fix for OnDragLeave causing a flickering affect #286
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
Conversation
Fixed flickering effect being caused with the addition and removal of the overclass on drag. When OnDragLeave event triggers the logic should be if the two elements are not the same remove the over class, otherwise return.
It does fix the flicker for me, but unfortunately the overlay is no longer removed if you take the drop outside the browser window. |
@klauspost is the browser window the entire drop target? does it happen in all browsers? |
At least in Chrome. The easiest way to reproduce is to set the entire browser window as a drop target. |
looks like we just need to add a handler for drag end event to capture that case. Added the event handler give it a try. |
@nervgh any chance of getting this reviewed and merged in the near future? |
@klauspost I revert the onDragEnd work I added, because it presented issues with multiple drop targets on a page. |
Fixed 9c584b2. Thanks, guys 👍 |
@rylan I have the same issue as @klauspost. The overclass is no longer removed when I drop outside of the target. It happens for me on Chrome, Firefox, and Safari. |
@jackhsu978 me too |
@Falldog you may be interested in this workaround. |
Fixed flickering effect being caused with the addition and removal of the overclass on drag. When OnDragLeave event triggers the logic should be if the two elements are not the same remove the over class, otherwise return.