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

Prevent opening card and applyLabelFilter on card drag end #3916

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

julien-nc
Copy link
Member

refs #2594

Problem: A click event is triggered on the element we drag (when dragging a card) when it's dropped.

This issue was mentioned in vue-smooth-dnd: kutlugsahin/vue-smooth-dnd#50 but no solution/fix was provided.

I can't find another way to solve this.

Suggested solution: Thanks to drag-start and drag-end events, we know if we are currently dragging a card or not. We pass this information to the cards. The applyLabelFilter and openCard methods of the CardItem component don't do anything when the card is being dragged.

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

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

Tested and works 👍

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
@julien-nc julien-nc force-pushed the fix/2594/click-event-on-drag-end branch from 035252f to 9d3f09f Compare July 12, 2022 10:47
@julien-nc julien-nc enabled auto-merge July 12, 2022 10:48
@juliusknorr
Copy link
Member

PHP tests skipped as no change affected PHP -> Merging

@juliusknorr juliusknorr merged commit 01e2708 into master Jul 12, 2022
@delete-merged-branch delete-merged-branch bot deleted the fix/2594/click-event-on-drag-end branch July 12, 2022 11:55
@juliusknorr
Copy link
Member

@eneiluj Just a quick hint, using resolves #2594 or closes #2594 will make sure that the linked issues get closed automatically. refs doesn't 😉

@juliusknorr
Copy link
Member

/backport to stable24

@juliusknorr
Copy link
Member

/backport to stable23

@juliusknorr
Copy link
Member

/backport to stable22

@julien-nc
Copy link
Member Author

@eneiluj Just a quick hint, using resolves #2594 or closes #2594 will make sure that the linked issues get closed automatically. refs doesn't wink

Yeah i always think "what if we don't want to close the issue now" but you're right, most of the time the PR closes the issue 😁.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants