Draft-js: Text input broken on android devices

Created on 19 Oct 2017  路  5Comments  路  Source: facebook/draft-js

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

Bug.

What is the current behavior?
When typing text in a draftJS editor, for example on the homepage of draftjs.org, text disappears as soon as a user types a space or enter.

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/.
It is reproducible on the homepage of draftjs.org

What is the expected behavior?
Text should not disappear.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
Latest version of draft.js.

So far I've been able to reproduce this behavior on:

  • Samsung devices running Android 6.
  • Google Nexus 5 running Android 6.
  • Google Pixel running Android 7.1.2.

The bug is not present on Samsung with android 5.1.1

duplicate

Most helpful comment

@flarnie the Draft.js homepage is still giving the misleading impression that this is a cross-browser solution, which is causing many people to invest time into this library and then find unexpectedly that it doesn't work for them. Draft.js doesn't work on the most popular web browser in the world. Why is this still being marketed this way?

All 5 comments

Hi - thanks for reporting this, and sorry that I don't think we'll be able to fix it in the near future. Several folks, including myself, have done projects to improve mobile web support of Draft.js and because of the variation and inconsistency of mobile web browser keyboard/input events it's out of scope for us to fully support right now.

We have added a notice to the docs about the known issues - I believe this is a duplicate of https://github.com/facebook/draft-js/issues/1077, and there are several issues reporting similar observations if you look at issues tagged 'android' and/or 'ios' - https://github.com/facebook/draft-js/issues?q=is%3Aopen+is%3Aissue+label%3Aandroid

I hope that long term Facebook will find a solution for rich text on mobile web, but it's unclear whether that will be part of Draft.js or something else.

@flarnie the Draft.js homepage is still giving the misleading impression that this is a cross-browser solution, which is causing many people to invest time into this library and then find unexpectedly that it doesn't work for them. Draft.js doesn't work on the most popular web browser in the world. Why is this still being marketed this way?

@iEchoic
The same problem also occurs with slate.js.
Very frustrated.

One fcking year later, still not working. Bugfixes have been provided, but FB won't merge it.

Still not working...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vierno picture vierno  路  3Comments

darklightblue picture darklightblue  路  3Comments

mvnnn picture mvnnn  路  3Comments

ianstormtaylor picture ianstormtaylor  路  3Comments

pklavins picture pklavins  路  3Comments