diff --git a/spec/paste.spec.js b/spec/paste.spec.js index 90cd65bea..6fbea1356 100644 --- a/spec/paste.spec.js +++ b/spec/paste.spec.js @@ -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 () { diff --git a/src/js/events.js b/src/js/events.js index 11a817071..10fd79335 100644 --- a/src/js/events.js +++ b/src/js/events.js @@ -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); @@ -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) {