Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird behavior with the android keyboard "Gboard" #194

Closed
RaulPROP opened this issue Mar 25, 2022 · 5 comments
Closed

Weird behavior with the android keyboard "Gboard" #194

RaulPROP opened this issue Mar 25, 2022 · 5 comments

Comments

@RaulPROP
Copy link
Collaborator

Steps to reproduce

  1. Go to http://slate-angular.ngnice.com/images, or any example that you want.
  2. Focus the editor on any word by taping at it.
  3. Double-tap the same word to select the range of the word.

Expected behaviour

The word is selected with its range.

Actual behaviour

Using the Gboard, the word gets duplicated and it is not range-selected, it just mantain the original selection of length 0.

Additional information

  1. This only happens on slate-angular. I could not reproduce it on slate.
  2. It is reproducible on any Android browsers except firefox (but firefox also doesn't range-selects the word).
  3. I tested it on iOS, and it works properly on any browser.

Video reproducing the issue

Screenrecorder-2022-03-25-15-20-15-899.mp4
@Benny739
Copy link

Any news on this one?
Swipe to text on gboard also makes the editor go completely crazy.

@RaulPROP
Copy link
Collaborator Author

I reported the same issue to lexical and they were able to fix it. As one of them said, the bug probably comes from the compositionstart event.

@RaulPROP
Copy link
Collaborator Author

RaulPROP commented Aug 9, 2022

There has been some pull requests [1], [2] on the slate-react package that solves most of the android issues.

I've tried to merge those changes into this package, but I have not achieve to make it work 100%.

I manage to solve the android issues, but then I somehow added some other bugs, some of them are:

  • on android, when pressing the enter, the text from the start of the paragraph to the cursor position gets duplicated.
  • some examples don't work, probably because of the selection management.
  • sometimes when pressing enter, the "can't resolve the DOM point" error emerges.

@pubuzhixing8 are you planning to merge those changes into this library?

@BitPhinix
Copy link

If you need help brining these changes to slate-angular I'd be happy to help out with any questions

@RaulPROP
Copy link
Collaborator Author

If you need help brining these changes to slate-angular I'd be happy to help out with any questions

I opened the PR #210 . Your help would be more than welcome :)

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

No branches or pull requests

4 participants