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

Fix dragging UI for media gallery [REACT] #4335

Conversation

thecalcc
Copy link
Contributor

@thecalcc thecalcc commented Oct 5, 2023

SDESK-6946

@thecalcc thecalcc requested a review from tomaskikutis October 5, 2023 08:04
@thecalcc thecalcc changed the title Fix dragging UI for media gallery Fix dragging UI for media gallery [REACT] Oct 5, 2023
@thecalcc thecalcc requested a review from petrjasek October 5, 2023 09:49
@petrjasek petrjasek added this to the 2.7 milestone Oct 5, 2023
@@ -102,8 +89,17 @@ export class DropZone3 extends React.PureComponent<IDropZoneComponentProps, ISta

return (
<div
onDragOver={(e) => {
e.preventDefault();
this.setState({dragging: true});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should check if it's already true before calling setState, dragOver will be triggered dozens of times as you drag an element

@thecalcc thecalcc merged commit ced9115 into superdesk:authoring-react-post-broadcasting Oct 9, 2023
1 of 3 checks passed
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

Successfully merging this pull request may close these issues.

3 participants