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

Text selection navigation with Shift+LeftArrow is buggy, depending on operating system #400

Open
shemetz opened this issue Sep 4, 2024 · 0 comments

Comments

@shemetz
Copy link

shemetz commented Sep 4, 2024

This bug happens with all recent versions of react-froala-wysiwyg, including the most recent version 4.2.2, on Chrome.

To reproduce:

  1. open a simple react-froala-wysiwyg sandbox -- https://codesandbox.io/p/sandbox/froala-react-wysiwyg-editor-59fx9z
  2. write some text, example
  3. click between the letter m and the letter p -- your caret will be placed there
  4. hold Shift and press Right-Arrow -- you'll get text selection of the letter p
  5. hold Shift and press Left-Arrow a few times

Expected: Text selection should become (empty) again, shrinking in the direction against the direction of expansion. After becoming empty, additional presses should select the text to the left of the caret - m, then am, then xam

Actual (bug) - in iOS: Text selection expands to the left, becoming a selection of mp. Pressing Shift+Left more keeps expanding selection to the left -- amp, xamp.

Actual (bug) - in Windows: Text selection shrinks correctly at first to (nothing), then expands once to the left, but then shrinks again (moving caret left). I see the selection becoming, in order: , m, , `a`, , x.
This bug does not happen in the normal web version of the Froala WYSIWYG editor -- compare https://froala.com/wysiwyg-editor/demo/


This bug looks similar/identical to previous bugs reported for prime Froala:

froala/wysiwyg-editor#2740

froala/wysiwyg-editor#4669

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

1 participant