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

DragOvering the DraggableObject from one SortableObjects to another not working properly. #212

Open
kesavan-ss opened this issue Feb 24, 2023 · 2 comments

Comments

@kesavan-ss
Copy link

kesavan-ss commented Feb 24, 2023

Hello,
When dragging the object and dragOvering to another list. It was added to the new list even without dropping the item. And not able to shift that item without dropping the currentDragItem. Then I need to drop the current item, drag and dragover the object again to shift the object.

The reason is,
const hasSameSortingScope = this. get('currentDragItem.sortingScope ') === emberObject.get('sortingScope');
this.get return undefined in this chain path.

sol:
const hasSameSortingScope = this. get('currentDragItem').sortingScope === emberObject.get('sortingScope');
or
const hasSameSortingScope = this.currentDragItem.sortingScope === emberObject.sortingScope;

Hopefully, it will not change other behaviors.

Can I create a pull request for this fix?

Thank You:)

@wambaloo
Copy link

Hi !

I cannot create pull requests because of rights. But I found the solution.
In addon/services/drag-coordinator.js, line 79 you can replace :
const hasSameSortingScope = this.get('currentDragItem.sortingScope') === emberObject.get('sortingScope');

by :
const hasSameSortingScope = this.get('currentDragItem').get('sortingScope') === emberObject.get('sortingScope');

And it will works :)

@dgavey
Copy link
Collaborator

dgavey commented Apr 24, 2023

You have to create the PR in your forked copy in order to submit it.

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

No branches or pull requests

3 participants