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

remove first empty paragraph on backspace #1187

Merged
merged 1 commit into from
Aug 19, 2016

Conversation

linkesch
Copy link
Member

Q A
Bug fix? more or less
New feature? no
BC breaks? no
Deprecations? no
New tests added? yes
Fixed tickets -
License MIT

Description

Most users don't know the difference between backspace and delete. So if they create a paragraph as the first element in the editor and they want to delete it, they place caret to the paragraph and press backspace. Which does nothing. In order to delete that paragraph you need to press delete / fn+backspace on mac, or move caret to a beginning of next paragraph and press backspace there.

I've seen people struggling with this, so this PR solves this problem. If a caret is in the first and empty paragraph and you press backspace, it will do delete instead - it will delete the empty paragraph and move the caret to next one.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.008%) to 94.994% when pulling a255915 on fix-backspace-in-first-empty-paragraph into cd6c109 on master.

@j0k3r
Copy link
Contributor

j0k3r commented Aug 19, 2016

Crazy people.

@j0k3r j0k3r merged commit cc4e764 into master Aug 19, 2016
@j0k3r j0k3r deleted the fix-backspace-in-first-empty-paragraph branch August 19, 2016 13:32
@nmielnik
Copy link
Member

😞 (sigh)

@MikeDevice
Copy link

How about make this feature are optional? I think not all people like this functional

keillera added a commit to keillera/medium-editor that referenced this pull request May 11, 2018
…st-empty-paragraph"

This reverts commit cc4e764, reversing
changes made to 7d30f19.
keillera added a commit to keillera/medium-editor that referenced this pull request May 11, 2018
…st-empty-paragraph"

This reverts commit cc4e764, reversing
changes made to a255915.
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

Successfully merging this pull request may close these issues.

None yet

5 participants