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

feat(cdk/drag-drop): expose native event objects in custom events #17077

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

crisbeto
Copy link
Member

Exposes the native MouseEvent and TouchEvent objects in the various drag&drop events since they can contain useful information like which keys were pressed while dragging.

Fixes #17032.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: major This PR is targeted for the next major release labels Sep 13, 2019
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 13, 2019
@crisbeto crisbeto force-pushed the drag-drop-native-events branch from 778e182 to 7b3c5bd Compare September 13, 2019 21:10
@@ -335,9 +336,11 @@ export class DropListRef<T = any> {
* container when the item was dropped.
* @param distance Distance the user has dragged since the start of the dragging sequence.
* @breaking-change 9.0.0 `distance` parameter to become required.
* 10.0.0 `event` parameter to become required.
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that this looks a little weird, but dgeni was throwing if I add it into a separate @breaking-change.

@crisbeto crisbeto force-pushed the drag-drop-native-events branch from 7b3c5bd to f639659 Compare September 13, 2019 21:39
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Sep 13, 2019
@crisbeto crisbeto force-pushed the drag-drop-native-events branch from f639659 to 74e42b2 Compare September 29, 2019 15:19
@crisbeto crisbeto force-pushed the drag-drop-native-events branch from 74e42b2 to a421c9f Compare March 4, 2020 21:34
@crisbeto crisbeto force-pushed the drag-drop-native-events branch from a421c9f to b451814 Compare March 28, 2020 16:12
@crisbeto crisbeto added this to the 10.0.0 milestone May 7, 2020
@jelbourn jelbourn modified the milestones: 10.0.0, 11.0.0 Jun 2, 2020
@crisbeto crisbeto force-pushed the drag-drop-native-events branch from b451814 to 461a7b3 Compare June 2, 2020 20:09
@crisbeto crisbeto force-pushed the drag-drop-native-events branch from 461a7b3 to 62cab55 Compare July 5, 2020 16:47
@mmalerba mmalerba removed the lgtm label Jul 31, 2020
@andrewseguin andrewseguin added needs rebase and removed cla: yes PR author has agreed to Google's Contributor License Agreement labels Dec 28, 2021
@crisbeto crisbeto changed the title feat(drag-drop): expose native event objects in custom events feat(cdk/drag-drop): expose native event objects in custom events Feb 24, 2022
Exposes the native `MouseEvent` and `TouchEvent` objects in the various drag&drop events since they can contain useful information like which keys were pressed while dragging.

Fixes angular#17032.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add to cdkDropList events data about keyboard with pressed control keys
5 participants