Page MenuHomePhabricator

Add an extra newline after <textarea> to preserve textarea content beginning with newlines
ClosedPublic

Authored by epriestley on Dec 5 2015, 11:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jan 26, 6:32 AM
Unknown Object (File)
Fri, Jan 24, 10:18 AM
Unknown Object (File)
Fri, Jan 24, 10:18 AM
Unknown Object (File)
Fri, Jan 24, 10:18 AM
Unknown Object (File)
Fri, Jan 24, 10:18 AM
Unknown Object (File)
Sat, Jan 18, 8:11 AM
Unknown Object (File)
Sun, Jan 12, 4:32 PM
Unknown Object (File)
Dec 13 2024, 1:28 AM
Subscribers
None

Details

Summary

Fixes T8707. See that task for discussion. Browser behavior is apparently to ignore a newline immediately following a <textarea>, and ostensibly has been since the early 1800s.

This is the same fix Rails used when it encountered this issue in 2011, which gives me some confidence it is correct.

Test Plan
  • Edited a task with leading newlines in the description.
  • Newlines were preserved correctly across multiple edits.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Add an extra newline after <textarea> to preserve textarea content beginning with newlines.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Dec 5 2015, 11:44 PM
This revision was automatically updated to reflect the committed changes.