facebook / facebook/lexical

Bug: Holding backspace sets selection to front without deleting first word on Android

Open
#5,413 0 comments 0 reactions 0 assignees View on GitHub
android-bug
Dominant language
TypeScript
Stars
23.9k
Forks
2.2k
Avg merge
1d 16h
Merged PRs (30d)
61

Description

The cursor jumps to the front and skips the first word (not removing it) when holding the backspace key on Android 13; SM-A528B Build/TP1A.220624.014. Chrome 120.0.6099.144

There seem to be different issues depending on the Keyboard

- Stock Samsung: When holding backspace long enough (so that it removes word by word and not letter by letter) every word gets deleted but the first. When reaching the first word the selection jumps to the front without removing the word.

- Gboard (on Samsung): Holding the Key works as expected. Gboard does not seam to start deleting word by word when holding backspace longer.

However: When (and only when) using the swipe input method and then holding the key, the selection will skip to the front and not remove the word, if only a single word was entered. For more than one word everything gets deleted as expected.

Lexical version: 0.12.5 (Playground)

## Steps To Reproduce

1. Delete everything in Playground
2. Type a few words in Samsung Keyboard
3. Hold backspace Key
4. First Word is Not removed

## The current behavior

First word is not deleted and selection skips to front

## The expected behavior

First Word also gets deleted

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in the Lexical Playground on Android 13 using the Samsung keyboard, holding backspace across one and several words; compare the stock keyboard, Gboard, and swipe input cases described here. Done means the first word is deleted rather than leaving the selection at the front, while the existing working Gboard behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, typescript
Domain
frontend, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.