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

Select & backspace removes only the single character preceding the selection start #37

Closed
ErisDS opened this issue Aug 5, 2015 · 1 comment
Assignees

Comments

@ErisDS
Copy link
Contributor

ErisDS commented Aug 5, 2015

Using select + backspace has stopped working between 0.2.1 and 0.2.2

How I reproduced:

  • on master (58ffbc8) using broccoli serve to test the demo

Test 1:

  • select the second line and press backspace
  • the newline between the first and second line is deleted, rather than the selected text

Test 2:

  • select both lines and press backspace
  • nothing is removed, the cursor moves to the beginning of the first line

Test 3:

  • select a few characters in the middle of a word and press backspace
  • the single character preceding the start of the selection is deleted

Placing the cursor between two characters and pressing backspace works as expected, deleting the single character preceding the cursor.

@ErisDS ErisDS changed the title Select & backspace doesn't remove content Select & backspace removes only the single character preceding the selection start Aug 5, 2015
@bantic
Copy link
Collaborator

bantic commented Aug 5, 2015

Thanks for the super thorough report! We are moving toward semantic actions in post-0.2.1 versions (so, starting at 0.2.2) — moving from reacting to changes to the contenteditable surface towards capturing keystrokes and modifying the internal representation based on user intent. Deletion-handling code is not yet selection-aware, which I think is the root cause of all these failures. I'm starting work on this today.

@bantic bantic self-assigned this Aug 5, 2015
bantic added a commit that referenced this issue Aug 5, 2015
bantic added a commit that referenced this issue Aug 6, 2015
bantic added a commit that referenced this issue Aug 6, 2015
bantic added a commit that referenced this issue Aug 6, 2015
bantic added a commit that referenced this issue Aug 6, 2015
bantic added a commit that referenced this issue Aug 6, 2015
@bantic bantic closed this as completed in 9998dbb Aug 9, 2015
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

2 participants