Homec4science

Fix transaction comment bug

Authored by Bob Trahan <bob.trahan@gmail.com> on Feb 14 2014, 00:10.

Description

Fix transaction comment bug

Summary: form.reset() resets a form to whatever values were present when the form was loaded into the DOM. Instead, grab all the pertinent form bits and set there values to "clear". I don't think there's too much utility in putting this somewhere more general, but it could be something like DOM.clearForm(form) or something. Fixes T3629.

Test Plan:
repro'd original issue

  • open legalpad doc (or your favorite application transaction powered app)
  • type in a comment but do not submit (you are creating a draft) e.g. "foo"
  • reload page and note comment appears e.g. "foo"
  • change comment e.g. "foobar"
  • submit comment
  • BUG - after submission, the comment reverts to the comment at initial page load e.g. "foo"

then after this patch, I can't repro it anymore with these steps - the comment is correctly blank

NOTE: this will need to be tested with more complicated forms.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T3629

Differential Revision: https://secure.phabricator.com/D8220

Details

Committed
Bob Trahan <bob.trahan@gmail.com>Feb 14 2014, 00:10
Pushed
aubortJan 31 2017, 17:16
Parents
rPHa4529b4e60b0: ProjectView improvements
Branches
Unknown
Tags
Unknown

Event Timeline

Bob Trahan <bob.trahan@gmail.com> committed rPH5729bbc085f2: Fix transaction comment bug (authored by Bob Trahan <bob.trahan@gmail.com>).Feb 14 2014, 00:10