Skip to content

Commit

Permalink
Only accept drag from different list
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq committed Oct 9, 2023
1 parent 9ae6cae commit 414ebe8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion javascripts/discourse/components/kanban/list.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ export default class KanbanList extends Component {
@action
dragOver(event) {
event.preventDefault();
this.acceptDrag = true;
if (this.args.definition !== this.args.dragData.oldDefinition) {
this.acceptDrag = true;
}
}

@action
Expand All @@ -173,6 +175,11 @@ export default class KanbanList extends Component {

@action
dropped() {
if (this.args.definition !== this.args.dragData.oldDefinition) {
// From same list
return;
}

const { topic, oldDefinition, oldRefresh } = this.args.dragData;
const thisDefinition = this.args.definition;

Expand Down

0 comments on commit 414ebe8

Please sign in to comment.