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

Wrong behaviour when hitting backspace in a single multi-line Text block - Safari 10 #519

Closed
clementprdhomme opened this issue Oct 12, 2016 · 4 comments

Comments

@clementprdhomme
Copy link
Contributor

clementprdhomme commented Oct 12, 2016

Good evening!

First of all, I want to thank you for your work. I've spent hours searching for an editor based on blocks and your library is perfect.

Then, while developing my own custom blocks, I noticed an issue with the default Text one. What happens is that, if the block is multi-line (if you used Shift + Enter to have a new lines), then when you hit the backspace key with the caret at the start of any line (except the first one), the block is merged into the previous one, whereas the line should be merged into the previous one.

Additionally, when the block is merged with the previous one, only the content of the first line is kept: the rest is deleted.

Here's a GIF of the issue:
Example of the issue when having several lines in a single Text block

I've dug into your code and identified the faulty lines. Here is a PR with a fix: #520

Clément

@raffij
Copy link
Contributor

raffij commented Oct 18, 2016

@clementprdhomme what os / browser and version are you showing this in?

@raffij
Copy link
Contributor

raffij commented Oct 18, 2016

Ok. It's in safari.

@clementprdhomme
Copy link
Contributor Author

Yes sorry, I didn't mention it. I've been testing it on Safari 10.

@raffij
Copy link
Contributor

raffij commented Oct 18, 2016

Looks good. Thanks @clementprdhomme

@raffij raffij closed this as completed Oct 18, 2016
@raffij raffij changed the title Wrong behaviour when hitting backspace in a single multi-line Text block Wrong behaviour when hitting backspace in a single multi-line Text block - Safari 10 Oct 18, 2016
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