-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
Add drag and drop support #1139
base: master
Are you sure you want to change the base?
Add drag and drop support #1139
Conversation
I tried to refactor the event listeners in the test to make sure it works with ember 3.8. I'm not sure how Ember did event listeners before |
@MelSumner @rwjblue wondering if there's time to review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me but I'd like to have @rwjblue review it for consistency. Thank you for doing this work! 👍
@JimSchofield hi! do you have some time to resolve the conflicts? |
moveDrag allows a user to simulat drag and drop events (https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API) This implementation allows the user to access dataTransfer on the event to simulate setting data to be transfered to the receiving event handler.
I spent some time today trying to rebase of of master here. I think I fixed the conflicts, but we're getting behavior changes and the tests are failing. I'm noticing that options being passed into |
3f850e0
to
0ae894a
Compare
@@ -48,28 +48,32 @@ export default function dragMove( | |||
.then(() => | |||
runHooks('dragMove', 'start', draggableStartElement, dropTargetElement) | |||
) | |||
.then(() => { | |||
.then(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a naive try to get it to work as it was before the fireEvent
change.
hello! sorry for not looking at this PR sooner -- would you be willing to rebase? |
I had to write this for one of my projects, and thought it would be helpful to include.
Tries to support the dataTransfer part of the drag, as that seems to be the most important thing with drag events.
I did not model drag events as a MouseEvent because keeping it a basic event is the simplest, however they are truly mouse events so it may be worth putting it under that umbrella in the code in the future.