Fix annoying inputmode bug

This commit is contained in:
Oliver Blanthorn 2018-04-20 17:25:10 +01:00
parent bcbbbe6607
commit 027371029c
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -41,14 +41,13 @@ function* ParserController() {
if (
state.mode != "ignore" &&
state.mode != "hint" &&
state.mode != "input" &&
state.mode != "find"
) {
if (isTextEditable(keyevent.target)) {
if (state.mode !== "insert") {
state.mode = "insert"
}
} else if (state.mode === "insert") {
} else if (["insert", "input"].includes(state.mode)) {
state.mode = "normal"
}
}