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
F15297877: D14688.id.diff
Wed, Mar 5, 12:44 PM
Unknown Object (File)
Wed, Feb 19, 5:37 PM
Unknown Object (File)
Wed, Feb 19, 5:37 PM
Unknown Object (File)
Wed, Feb 19, 5:37 PM
Unknown Object (File)
Wed, Feb 19, 5:37 PM
Unknown Object (File)
Feb 9 2025, 12:00 AM
Unknown Object (File)
Feb 9 2025, 12:00 AM
Unknown Object (File)
Feb 9 2025, 12:00 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
Branch
ex10
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 9341
Build 11096: Run Core Tests
Build 11095: arc lint + arc unit

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.