Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Two things were broken:
<div>
elements within thecontenteditable
to represent newlines and our CSS was making themheight: 100%
.textContent
orinnerText
for that - see e.g. https://stackoverflow.com/q/64105609/1709587 and https://stephenhaney.com/2020/get-contenteditable-plaintext-with-correct-linebreaks/Point 1 is easy to fix, though I worry slightly that some browsers might do really eccentric things (and I don't have a Mac to test Safari). Point 2, there are fixes available (see Stephen Haney's post, or https://stackoverflow.com/a/15349136/1709587) but they're kinda hacky and make me nervous.
Fortunately I don't think we need to use either of those hacks nor do anything clever to fix this, because we can simply replace the
contenteditable
div with atextarea
. We never needed any functionality more complicated than what atextarea
provides in the first place!Fixes #575