Android/GBoard: Fix pressing Enter after accepting a completion doesn't fire event handlers (#1312) #62

Closed
personalizedrefrigerator wants to merge 2 commits from pr/fix-android-gboard-enter into main
personalizedrefrigerator commented 2024-01-31 18:25:04 +01:00 (Migrated from github.com)

Summary

Fixes https://github.com/codemirror/dev/issues/1312, by extending the enter event emitting logic for Android keyboards.

Notes

If I

  1. log change and sel just before the added condition to the if statement and
  2. accept a GBoard suggestion and press enter,

then at the location of the change, we have

change: {
    from: 13,
    to: 14,
    insert: { length: 1, text: ['', ''] }
}

and

sel: {
    from: 14,
    to: 14,
    flags: 1073741767,
    anchor: 14,
    assoc: 0,
    bidiLevel: null,
    empty: true,
    goalColumn: undefined,
    head: 14
}
# Summary Fixes https://github.com/codemirror/dev/issues/1312, by extending the <kbd>enter</kbd> event emitting logic for Android keyboards. # Notes If I 1. log `change` and `sel` just before the added condition to the `if` statement and 2. accept a GBoard suggestion and press <kbd>enter</kbd>, then at the location of the change, we have ```js change: { from: 13, to: 14, insert: { length: 1, text: ['', ''] } } ``` and ```js sel: { from: 14, to: 14, flags: 1073741767, anchor: 14, assoc: 0, bidiLevel: null, empty: true, goalColumn: undefined, head: 14 } ```
personalizedrefrigerator commented 2024-02-19 18:03:36 +01:00 (Migrated from github.com)

Closing — this was fixed by github.com/codemirror/view@fc1d11fb35.

Closing — this was fixed by https://github.com/codemirror/view/commit/fc1d11fb3572afc1ca5dfee2700fef98eb91c84d.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/view!62
No description provided.