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

Pressing enter*2 while in a list should end it #2

Closed
vjeux opened this issue Mar 8, 2016 · 4 comments
Closed

Pressing enter*2 while in a list should end it #2

vjeux opened this issue Mar 8, 2016 · 4 comments
Assignees
Labels

Comments

@vjeux
Copy link

vjeux commented Mar 8, 2016

On every wysiwyg I know, if you have a bulleted list and do enter (add an empty bullet) and enter again it will remove the empty bullet and break out of the list.

In react-rte, it keeps adding more bullets.

@sstur
Copy link
Owner

sstur commented Mar 9, 2016

Agreed. This is a bug. The enter/return handling is internal to DraftJS but I could probably work around that in React-RTE.

Thanks!

@sstur sstur self-assigned this Mar 9, 2016
@sstur sstur added the bug label Mar 9, 2016
@vjeux
Copy link
Author

vjeux commented Mar 9, 2016

Probably worth fixing inside of draft as well :)

@sstur
Copy link
Owner

sstur commented Mar 11, 2016

@vjeux: This is now fixed in master. Thanks for reporting!
EDIT: To be clear, if the cursor is in an empty list item and return/enter is pressed, the return handler will either decrease the indent (if depth > 0) or change the block type to "normal" (end the list).

@sstur sstur closed this as completed Mar 11, 2016
@vjeux
Copy link
Author

vjeux commented Mar 11, 2016

Awesome, thanks for the quick fix

nikecms referenced this issue in nikecms/react-rte Feb 23, 2018
Add ability to open links in new tab
ljorgens pushed a commit to Pick6Solutions/react-rte that referenced this issue Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants