Skip to content

Commit 4497ca8

Browse files
author
Victor
committed
chore: remove unnecessary code
1 parent d047091 commit 4497ca8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/plugin/keypress.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,9 @@ export default function (mind: MindElixirInstance, options: boolean | KeypressOp
182182
...options,
183183
}
184184
mind.container.onkeydown = e => {
185+
// it will prevent all input in children node, so we have to stop propagation in input element
185186
e.preventDefault()
186187
if (!mind.editable) return
187-
// TODO
188-
if (e.target !== e.currentTarget) {
189-
// input
190-
return
191-
}
192188
const keyHandler = key2func[e.key]
193189
keyHandler && keyHandler(e)
194190
}

0 commit comments

Comments
 (0)