add original event to focus and blur event

This commit is contained in:
Philipp Kühn
2018-12-19 23:13:58 +01:00
parent 1b5b0c6903
commit 4113ac6c68
2 changed files with 6 additions and 4 deletions

View File

@@ -185,12 +185,14 @@ export default class Editor {
view.dom.style.whiteSpace = 'pre-wrap'
view.dom.addEventListener('focus', () => this.options.onFocus({
view.dom.addEventListener('focus', event => this.options.onFocus({
event,
state: this.state,
view: this.view,
}))
view.dom.addEventListener('blur', () => this.options.onBlur({
view.dom.addEventListener('blur', event => this.options.onBlur({
event,
state: this.state,
view: this.view,
}))