pass options on removeEventListener (#904)

* pass options on removeEventListener by removeAll

* rebuild

* Merge branch 'release/2.16' into pr/904

* Update CHANGELOG.md

* Update inline.ts
This commit is contained in:
Marina 2019-11-30 19:44:08 +02:00 committed by Peter Savchenko
parent fa4b2826a3
commit 729f2ea386
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

@ -11,6 +11,7 @@
`Fix` — Fix flipper with empty dom iterator [#926](https://github.com/codex-team/editor.js/issues/926)
- `Fix` — Normalize node before walking through children at `isEmpty` method [943](https://github.com/codex-team/editor.js/issues/943)
`Fix` — Fixed Grammarly conflict [#779](https://github.com/codex-team/editor.js/issues/779)
`Improvements` — Module Listeners now correctly removes events with options [#904](https://github.com/codex-team/editor.js/pull/904)
`Fix` — Fixed History Back on block deletion by Backspace in Firefox [#967](https://github.com/codex-team/editor.js/pull/967)
### 2.15.1

View file

@ -145,7 +145,7 @@ export default class Listeners extends Module {
*/
public removeAll(): void {
this.allListeners.map( (current) => {
current.element.removeEventListener(current.eventType, current.handler);
current.element.removeEventListener(current.eventType, current.handler, current.options);
});
this.allListeners = [];