See T8705, I simply added a project, and it says I edited the description. Clicking on the 'description change' edit link also acts oddly.
Description
Revisions and Commits
Related Objects
Event Timeline
To reproduce:
- Create a task with leading newlines in the task description.
- Use "Edit Task" to adjust any other field.
Apparently this is just how <textarea> works. Here's a test case in WebKit explicitly testing this behavior:
http://trac.webkit.org/browser/trunk/LayoutTests/fast/forms/textarea-newline.html?rev=82656
Here's discussion of this issue in Rails, although it's open source so it's 9000 pages long of people yelling at each other and I can't figure out what actually happened:
https://github.com/rails/rails/issues/393
I think this is the fix, which just adds a "\n" at he beginning:
https://github.com/rails/rails/commit/a4e4d2855bbad1c1400fb89ba663f7193d76dc10
...although this was later reverted and replaced with crazy nonsense with approximately the same effect because of something called "HAML":
https://github.com/rails/rails/commit/33164c8f1479b826a044ab90f4cc2439666e4b16
...which persists to this day:
https://github.com/rails/rails/blob/master/actionview/lib/action_view/helpers/tag_helper.rb#L25
So it's probably fine to just do that.