1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-19 16:58:48 +02:00

When cancelling an inline comment edit, exit the edit state after the response arrives

Summary: Ref T13513. This fixes a bug where clicking a line number, then clicking "Cancel" causes the paths panel to briefly update with an extra inline comment counted on the file.

Test Plan:
  - Clicked a line number.
  - Typed some text.
  - Clicked "Cancel".
  - Before patch: paths panel flashes "1".
  - After patch: paths panel stays stable.

Maniphest Tasks: T13513

Differential Revision: https://secure.phabricator.com/D21253
This commit is contained in:
epriestley 2020-05-14 11:17:51 -07:00
parent cfb5de6fa7
commit f45519c060
2 changed files with 7 additions and 8 deletions

View file

@ -13,7 +13,7 @@ return array(
'core.pkg.js' => '0efaf0ac',
'dark-console.pkg.js' => '187792c2',
'differential.pkg.css' => 'b042ee8b',
'differential.pkg.js' => '79dfae6e',
'differential.pkg.js' => '5d560bda',
'diffusion.pkg.css' => '42c75c37',
'diffusion.pkg.js' => 'a98c0bf7',
'maniphest.pkg.css' => '35995d6d',
@ -381,7 +381,7 @@ return array(
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8',
'rsrc/js/application/diff/DiffChangeset.js' => 'b6bb0240',
'rsrc/js/application/diff/DiffChangesetList.js' => '1e8658bb',
'rsrc/js/application/diff/DiffInline.js' => '9bb6f2ad',
'rsrc/js/application/diff/DiffInline.js' => '734d3c33',
'rsrc/js/application/diff/DiffPathView.js' => '8207abf9',
'rsrc/js/application/diff/DiffTreeView.js' => '5d83623b',
'rsrc/js/application/differential/behavior-diff-radios.js' => '925fe8cd',
@ -776,7 +776,7 @@ return array(
'phabricator-dashboard-css' => '5a205b9d',
'phabricator-diff-changeset' => 'b6bb0240',
'phabricator-diff-changeset-list' => '1e8658bb',
'phabricator-diff-inline' => '9bb6f2ad',
'phabricator-diff-inline' => '734d3c33',
'phabricator-diff-path-view' => '8207abf9',
'phabricator-diff-tree-view' => '5d83623b',
'phabricator-drag-and-drop-file-upload' => '4370900d',
@ -1565,6 +1565,9 @@ return array(
'javelin-util',
'javelin-reactor-node-calmer',
),
'734d3c33' => array(
'javelin-dom',
),
'73ecc1f8' => array(
'javelin-behavior',
'javelin-behavior-device',
@ -1792,9 +1795,6 @@ return array(
'javelin-install',
'javelin-util',
),
'9bb6f2ad' => array(
'javelin-dom',
),
'9c01e364' => array(
'javelin-behavior',
'javelin-dom',

View file

@ -736,8 +736,6 @@ JX.install('DiffInline', {
this._drawUneditRows(text);
}
this.setEditing(false);
// If this was an empty box and we typed some text and then hit cancel,
// don't show the empty concrete inline.
if (!this._originalText) {
@ -764,6 +762,7 @@ JX.install('DiffInline', {
},
_onCancelResponse: function(response) {
this.setEditing(false);
this.setLoading(false);
// If the comment was empty when we started editing it (there's no