Paste listener on editors instead of document (#1025)

* Paste listener on editors instead of document

* add changelog

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
This commit is contained in:
Emmanuel Francis Ramos Jr 2020-03-04 02:21:26 +08:00 committed by GitHub
parent 0bb7141d1a
commit 74c75330aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

2
dist/editor.js vendored

File diff suppressed because one or more lines are too long

View file

@ -4,6 +4,7 @@
- `Improvements` - Editor's [onchange callback](https://editorjs.io/configuration#editor-modifications-callback) now accepts an API as a parameter
- `Fix` - Some mistakes are fixed in [installation.md](installation.md)
- `Fix` - Fixed multiple paste callback triggering in a case when several editors are instantiated [#1011](https://github.com/codex-team/editor.js/issues/1011)
### 2.16.1

View file

@ -226,7 +226,7 @@ export default class Paste extends Module {
private setCallback(): void {
const {Listeners} = this.Editor;
Listeners.on(document, 'paste', this.handlePasteEvent);
Listeners.on(this.Editor.UI.nodes.holder, 'paste', this.handlePasteEvent);
}
/**