Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Backspacing and deletion of immutable/segmented entities handled incorrectly with some Android keyboards #1066

@mmmoussa

Description

@mmmoussa

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When backspacing using some Android keyboards such as the Google keyboard, no key events are fired and no key codes are provided by the input event data when editOnInput gets called. This is an issue with the keyboard and is not likely to be fixed in the near future, if at all. As a result of this issue, backspacing cannot currently be detected before the editOnInput event fires and is being handled incorrectly. Among other problems, the selection state being used in editOnInput is incorrect and there is no support for deleting entities.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. You can use this jsfiddle to get started: https://jsfiddle.net/stopachka/m6z0xn4r/.
This bug is reproducible on Android phones using the Google keyboard. It can be reproduced by inserting an immutable entity into the editor and then trying to delete it by backspacing into it.

What is the expected behavior?
The expected behaviour is that backspacing is handled the same on Android devices as it is with other devices, including entity deletion.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
This issue affects all versions of Draft.js on Android.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions