-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix line break insertion #10297
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
Fix line break insertion #10297
Conversation
8884781 to
b625b36
Compare
mcsf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test/e2e/specs/writing-flow.test.js
Outdated
| await page.keyboard.press( 'ArrowLeft' ); | ||
| await page.keyboard.down( 'Shift' ); | ||
| await page.keyboard.press( 'Enter' ); | ||
| await page.keyboard.up( 'Shift' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a very handy helper: pressWithModifier( 'Shift', 'Enter' )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to work for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh never mind :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why Unicode 2028 instead of a plain (ASCII-level) line break?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we're using that to delimit lines in multiline values. We could probably benefit from a helper or a constant...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And \n are used for single line breaks which convert to <br> elements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fair, but let's add a comment for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment then 🚢 🚢 !
Yes, noticed this with Jorge the other day, will fix separately. |
5576929 to
8e7a242
Compare
c7a23e3 to
047f607
Compare

Description
Fixes an issue where inserting like breaks would throw an error. This either happens when pressing shift+enter in a rich text field that can be split, like a paragraph, or when pressing enter in a rich text field that cannot be split, like a caption.
How has this been tested?
Press enter in e.g. a caption. A line break should be added.
Screenshots
Types of changes
Checklist: