HomePhabricator

Fix transaction comment bug

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

Provenance
btrahanAuthored on
btrahanPushed on Feb 13 2014, 11:10 PM
Reviewer
epriestley
Differential Revision
D8220: Fix transaction comment bug
Parents
rPa4529b4e60b0: ProjectView improvements
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task

Event Timeline