Skip to content

Commit

Permalink
pass options on removeEventListener (#904)
Browse files Browse the repository at this point in the history
* pass options on removeEventListener by removeAll

* rebuild

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

* Update CHANGELOG.md

* Update inline.ts
  • Loading branch information
MarinaZadoyanchuk authored and neSpecc committed Nov 30, 2019
1 parent fa4b282 commit 729f2ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/editor.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/components/modules/listeners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down

0 comments on commit 729f2ea

Please sign in to comment.