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
F13238103: D14688.id35524.diff
Tue, May 21, 5:08 PM
F13237947: D14688.id35525.diff
Tue, May 21, 4:11 PM
F13222152: D14688.diff
Sun, May 19, 3:24 AM
F13206492: D14688.id35524.diff
Wed, May 15, 11:17 AM
F13204685: D14688.diff
Wed, May 15, 12:50 AM
F13187758: D14688.diff
Sat, May 11, 4:44 AM
Unknown Object (File)
Tue, May 7, 7:55 AM
Unknown Object (File)
Fri, May 3, 7:36 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.