Skip to content

Commit

Permalink
Also handle beforeInput events with insertLineBreak
Browse files Browse the repository at this point in the history
FIX: Extend detection of Enter presses on Android to `beforeInput` events with
an `"insertLineBreak"` type.

Issue codemirror/dev#1145
Closes #56
  • Loading branch information
marijnh committed Jul 6, 2023
1 parent 94ba222 commit 2670dda
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ export class InputState {
const PendingKeys = [
{key: "Backspace", keyCode: 8, inputType: "deleteContentBackward"},
{key: "Enter", keyCode: 13, inputType: "insertParagraph"},
{key: "Enter", keyCode: 13, inputType: "insertLineBreak"},
{key: "Delete", keyCode: 46, inputType: "deleteContentForward"}
]

Expand Down

0 comments on commit 2670dda

Please sign in to comment.