-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Empty line at the end of description didn't vanish after deletion #763
Comments
I can confirm this bug. Thanks for the report. |
I think this might be a bug in diagram-js instead of bpmn-js. Two newlines are inserted when pressing shift+enter in a contenteditable div, which are later parsed as Once those two characters have been inserted and the task is rendered as SVG after pressing enter, only one is removed on backspace when trying to edit again. This leaves a stray I thought of trimming whitespace before parsing as
For what it's worth, trimming and thus preventing trailing whitespace from being rendered as SVG would also prevent the task's text from being rendered outside of the task itself: Any thoughts? If the two points above aren't an issue, I could prepare a PR with the trim I mentioned. |
My guess is that we must properly handle this issue in diagram-js-direct-editing. One approach would be to make sure that the text is trimmed after editing, committing it without trailing and leading whitespace. |
Makes sense, how about this? |
Needs patch release of diagram-js. |
Fixed via 0cfd960 |
I add a newline at the end of a task name.
Then I delete the the empty line.
Expected Behavior
The task name is in the middle of the task
Actual Behavior
The task name is shift to the top
Steps to reproduce the Behavior
The text was updated successfully, but these errors were encountered: