Skip to content

Commit

Permalink
Remove dragover, drop listeners
Browse files Browse the repository at this point in the history
Catching and canceling these events prevents any other party from
reacting to drag/drop events in a card.
  • Loading branch information
bantic committed Oct 20, 2015
1 parent ac3e6c5 commit 29db470
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/js/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ class Editor {
}

_setupListeners() {
const elementEvents = ['keydown', 'keyup', 'input', 'dragover', 'drop', 'paste'];
const elementEvents = ['keydown', 'keyup', 'input', 'paste'];
const documentEvents = ['mouseup'];

elementEvents.forEach(eventName => {
Expand Down Expand Up @@ -586,14 +586,6 @@ class Editor {
}
}

handleDragover(e) {
e.preventDefault(); // FIXME for now, just prevent default
}

handleDrop(e) {
e.preventDefault(); // FIXME for now, just prevent default
}

_insertEmptyMarkupSectionAtCursor() {
const section = this.run(postEditor => {
const section = postEditor.builder.createMarkupSection('p');
Expand Down

0 comments on commit 29db470

Please sign in to comment.