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

[Bug] Android auto suggestion: inserts duplicate characters, hides content #911

Closed
EmpireJones opened this issue Jan 3, 2017 · 3 comments

Comments

@EmpireJones
Copy link

When I select a suggestion via the android keyboard, sometimes it inserts duplicate characters or temporarily hides the content. Reproduced on https://facebook.github.io/draft-js/

It seems to more consistently occur when you start with no text.

In this first example:

  1. Typed "Wh"
  2. "Pressed "What" suggestion
  3. "Editor showed "WhatW"
    videotogif_2017 01 02_18 36 46

In this second example:

  1. Typed "The following"
  2. deleted it
  3. opened keyboard
  4. pressed "The" suggestion (editor was blank)
  5. opened keyboard
  6. pressed "Hi" suggestion (editor was blank)
  7. opened keyboard
  8. typed "asdf"
  9. pressed "ASDF" suggestion
  10. editor showed "ASDFHiTheT"

videotogif_2017 01 02_18 49 33

What is the expected behavior?
No invisible text or duplicate characters

draft-js 0.9.1
Android chrome version 55.0.2883.91

@EmpireJones
Copy link
Author

Here's a general description of a case very similar to the first example above:

  1. Type something
  2. Delete it via backspace
  3. Type a word
  4. Press space key

Results in:

@will-hart
Copy link

will-hart commented Jan 29, 2017

I think some of the behaviour, i.e. the keyboard closing is related to #888 which has an un-merged PR #907.

I've also found it doesn't like adding text at the very start of the document sometimes, which is what appears to be happening in your second gif.

On Android when the word is underlined it doesn't actually appear to be in the editor - i.e. the word is not sent to my server from the onChange callback until I hit space or select an autocorrect option. I wonder if this is contributing. (edit: see #102 and #580 I think)

@flarnie
Copy link
Contributor

flarnie commented Oct 14, 2018

Merging this into a general Android bug issue - see #1895

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants