@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix an issue when deleting the entire content of an unsubmitted inline comment

Summary: Ref T12733. In this case, the server returns no new `row`, but we would incorrectly try to bind to one.

Test Plan:
- Created a new comment.
- Edited it.
- Deleted all the text.
- Saved changes.
- Before: Header continues to show phantom "1 Unsubmitted Comment", browser error log reflects one error.
- After: Header reflects comment being deleted, error log is quiet.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12733

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

+14 -7
+6 -6
resources/celerity/map.php
··· 13 13 'core.pkg.js' => '5d80e0db', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => '45951e9e', 16 - 'differential.pkg.js' => '1d80ecc6', 16 + 'differential.pkg.js' => '414ada25', 17 17 'diffusion.pkg.css' => 'a2d17c7d', 18 18 'diffusion.pkg.js' => '6134c5a1', 19 19 'favicon.ico' => '30672e08', ··· 399 399 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63', 400 400 'rsrc/js/application/diff/DiffChangeset.js' => '99abf4cd', 401 401 'rsrc/js/application/diff/DiffChangesetList.js' => 'cb1570cb', 402 - 'rsrc/js/application/diff/DiffInline.js' => '1bfa31c7', 402 + 'rsrc/js/application/diff/DiffInline.js' => 'e83d28f3', 403 403 'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832', 404 404 'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07', 405 405 'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1', ··· 779 779 'phabricator-dashboard-css' => 'fe5b1869', 780 780 'phabricator-diff-changeset' => '99abf4cd', 781 781 'phabricator-diff-changeset-list' => 'cb1570cb', 782 - 'phabricator-diff-inline' => '1bfa31c7', 782 + 'phabricator-diff-inline' => 'e83d28f3', 783 783 'phabricator-drag-and-drop-file-upload' => '58dea2fa', 784 784 'phabricator-draggable-list' => 'bea6e7f4', 785 785 'phabricator-fatal-config-template-css' => '8f18fa41', ··· 1019 1019 'javelin-vector', 1020 1020 'javelin-request', 1021 1021 'javelin-uri', 1022 - ), 1023 - '1bfa31c7' => array( 1024 - 'javelin-dom', 1025 1022 ), 1026 1023 '1e911d0f' => array( 1027 1024 'javelin-stratcom', ··· 2093 2090 'javelin-json', 2094 2091 'javelin-workflow', 2095 2092 'javelin-magical-init', 2093 + ), 2094 + 'e83d28f3' => array( 2095 + 'javelin-dom', 2096 2096 ), 2097 2097 'e9581f08' => array( 2098 2098 'javelin-behavior',
+8 -1
webroot/rsrc/js/application/diff/DiffInline.js
··· 702 702 JX.DOM.remove(this._row); 703 703 } 704 704 705 - this.bindToRow(new_row); 705 + // If you delete the content on a comment and save it, it acts like a 706 + // delete: the server does not return a new row. 707 + if (new_row) { 708 + this.bindToRow(new_row); 709 + } else { 710 + this.setDeleted(true); 711 + this._row = null; 712 + } 706 713 707 714 this._didUpdate(); 708 715 },