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)
Fri, Dec 13, 1:28 AM
Unknown Object (File)
Thu, Dec 12, 2:54 AM
Unknown Object (File)
Tue, Dec 10, 1:50 PM
Unknown Object (File)
Sat, Dec 7, 7:56 PM
Unknown Object (File)
Sun, Dec 1, 10:08 AM
Unknown Object (File)
Sun, Dec 1, 10:08 AM
Unknown Object (File)
Sun, Dec 1, 10:08 AM
Unknown Object (File)
Sun, Dec 1, 10:08 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.