There is currently a bug in the editor when the last line of text uses one of the style icons. In this use case, if the cursor is after this style block (ie. the very end of the message) and you hit the return key, a newline is inserted before the style block instead of after it.
This happens on both the initial message create, and also if you go back and edit a message.
Here is a sample message that shows the error use case.
Here is the first line of text.
singingHere is a singing line of textsinging
This same issue also happens with the new Quote feature. It appears to be related to block level items.
This plugin appears like it might provide the fix we need. The plugin requires this plugin framework for draftjs. The framework might be a nice win anyway as there are some other plugins we may want to use such as emoji, image, linkify among others (these plugins will be in a separate Issue).
Overview
There is currently a bug in the editor when the last line of text uses one of the style icons. In this use case, if the cursor is after this style block (ie. the very end of the message) and you hit the return key, a newline is inserted before the style block instead of after it.
This happens on both the initial message create, and also if you go back and edit a message.
Here is a sample message that shows the error use case.
This same issue also happens with the new Quote feature. It appears to be related to block level items. This plugin appears like it might provide the fix we need. The plugin requires this plugin framework for draftjs. The framework might be a nice win anyway as there are some other plugins we may want to use such as emoji, image, linkify among others (these plugins will be in a separate Issue).