WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

[Android] Extra characters deleted when selecting word and typing #4747

@elliotdavies

Description

@elliotdavies

When selecting a word and typing to replace it, too many characters are deleted. Specifically, the selected word is deleted and then the same number of characters are deleted again.

I've only observed this when using the Android virtual keyboard (on a Samsung Galaxy Tab S9).

Steps to reproduce

  • Type a few words into Quill e.g. This is some text
  • Select a word e.g. some
  • Type a letter e.g. y
  • Expected result: This is y text (y was inserted and the 4 characters of some were deleted)
  • Actual result: This is yt (y was inserted and 8 characters were deleted)
Screen_Recording_20251028_145808_Samsung.Internet.mp4

Cause

It seems that Quill emits the .delete delta twice, once when the IME composition begins and once when it ends. (The Android virtual keyboard is considered an IME.)

  • When the composition begins Quill emits .retain(8).delete(4)
  • When the composition ends Quill emits .retain(8).insert("y").delete(4) <-- this .delete should not be here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions