Skip to content

fix(list, block-group): fix drag handle events when lists or blocks are nested #11816

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

Merged
merged 8 commits into from
Apr 15, 2025

Conversation

driskull
Copy link
Member

@driskull driskull commented Mar 27, 2025

Related Issue: #11774

Summary

  • Prevents default on drag handle events when used by a parent component so that any further parents up the DOM won't receive them
  • Parents further up the dom will ignore the cancelled event
  • Modifies tests

@driskull driskull marked this pull request as draft March 27, 2025 21:14
@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Mar 27, 2025
@driskull driskull requested a review from jcfranco March 28, 2025 23:47
@driskull driskull marked this pull request as ready for review March 28, 2025 23:47
@driskull driskull changed the title fix(list, block-group): fix drag handle events when lists and blocks are used fix(list, block-group): fix drag handle events when lists or blocks are nested Apr 1, 2025
@driskull driskull added the skip visual snapshots Pull requests that do not need visual regression testing. label Apr 9, 2025
@@ -532,6 +532,7 @@ export class List extends LitElement implements InteractiveComponent, SortableCo
return;
}

event.stopPropagation();
Copy link
Member

Choose a reason for hiding this comment

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

This and the block below (and any other common logic) would also be good to include in #11849.

@driskull driskull requested a review from jcfranco April 11, 2025 21:47
@driskull
Copy link
Member Author

@jcfranco can you review again?

Copy link
Member

@benelan benelan left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

Awesome! 🚀

@driskull driskull merged commit 09296dd into dev Apr 15, 2025
10 checks passed
@driskull driskull deleted the dris0000/list-block-fix-drag-handle-events branch April 15, 2025 16:33
@github-actions github-actions bot added this to the 2025-04-29 - Apr Milestone milestone Apr 15, 2025
benelan added a commit that referenced this pull request Apr 17, 2025
…gis-deps

* origin/dev: (31 commits)
  chore: add workflow manager to team issue templates (#11971)
  chore: release next
  feat(accordion-item): enhance component's interactivity states (#11935)
  chore: release next
  build(deps): update dependency lerna to v8.2.2 (#11948)
  feat(switch): enhance component's colors for a11y and usability (#11951)
  chore: release next
  ci: remove redundant test mode environment variable (#11958)
  fix(input-date-picker): allow clearing invalid date value (#11937)
  build: update browserslist db (#11946)
  feat(notice): add token for close icon and title text color (#11938)
  fix(list, block-group): fix drag handle events when lists or blocks are nested (#11816)
  chore: release next
  build(deps): update dependency vite to v5.4.18 (#11949)
  ci: default to stable tests when experimental mode is not set (#11957)
  fix(input-number): cancel arrow down event (#11956)
  refactor: tidy up (#11945)
  docs(checkbox): update icon color prop context (#11950)
  build(deps): bump node minor version (#11927)
  chore: release next
  ...
benelan pushed a commit that referenced this pull request May 14, 2025
…re nested (#11816)

**Related Issue:** #11774

## Summary

- Prevents default on drag handle events when used by a parent component
so that any further parents up the DOM won't receive them
- Parents further up the dom will ignore the cancelled event
- Modifies tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug. skip visual snapshots Pull requests that do not need visual regression testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants