Skip to content

Commit

Permalink
Undo changes from 8bd8f8f
Browse files Browse the repository at this point in the history
  • Loading branch information
nmielnik committed Jun 18, 2016
1 parent 5b129be commit e37199d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/paste.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe('Pasting content', function () {
var evt = prepareEvent(editorEl, 'paste');
firePreparedEvent(evt, editorEl, 'paste');
jasmine.clock().tick(1);
expect(spy).toHaveBeenCalledWith({ currentTarget: this.el, target: this.el }, this.el);
expect(spy).toHaveBeenCalledWith(evt, this.el);
});

it('should filter multi-line rich-text pastes when "insertHTML" command is not supported', function () {
Expand Down
4 changes: 3 additions & 1 deletion src/js/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@
// Detecting drop on the contenteditables
this.attachToEachElement('drop', this.handleDrop);
break;
// TODO: We need to have a custom 'paste' event separate from 'editablePaste'
// Need to think about the way to introduce this without breaking folks
case 'editablePaste':
// Detecting paste on the contenteditables
this.attachToEachElement('paste', this.handlePaste);
Expand Down Expand Up @@ -556,7 +558,7 @@
},

handlePaste: function (event) {
this.triggerCustomEvent('editablePaste', { currentTarget: event.currentTarget, target: event.target }, event.currentTarget);
this.triggerCustomEvent('editablePaste', event, event.currentTarget);
},

handleKeydown: function (event) {
Expand Down

0 comments on commit e37199d

Please sign in to comment.