Skip to content

Commit

Permalink
Chromeでデッキのカラムがドラッグできない問題を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Dec 28, 2020
1 parent d9552b6 commit b0dd9d4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/client/app/common/views/deck/deck.column.vue
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,12 @@ export default Vue.extend({
onDragstart(e) {
e.dataTransfer.effectAllowed = 'move';
e.dataTransfer.setData('mk-deck-column', this.isTemporaryColumn ? 'TEMP' : this.column.id);
this.dragging = true;
// Chromeのバグで、Dragstartハンドラ内ですぐにDOMを変更する(=リアクティブなプロパティを変更する)とDragが終了してしまう
// SEE: https://stackoverflow.com/questions/19639969/html5-dragend-event-firing-immediately
setTimeout(() => {
this.dragging = true;
}, 10);
},
onDragend(e) {
Expand Down

0 comments on commit b0dd9d4

Please sign in to comment.