From 4042ea64851848c2a50d50a8eeb191174dbd328a Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 22 May 2020 15:27:52 -0700 Subject: [PATCH] (stable) When cancelling an edit of an inline with content, don't hide the inline Summary: See PHI1753. This condition got rewritten for suggested edits and accidentally inverted. Test Plan: - Create a comment, type text, save draft, edit comment, cancel. - Before: comment hides itself. - After: comment properly cancels into pre-edit draft state. Differential Revision: https://secure.phabricator.com/D21286 --- resources/celerity/map.php | 12 ++++++------ webroot/rsrc/js/application/diff/DiffInline.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 1d98650a7e..df11037696 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -13,7 +13,7 @@ return array( 'core.pkg.js' => '845355f4', 'dark-console.pkg.js' => '187792c2', 'differential.pkg.css' => '5c459f92', - 'differential.pkg.js' => '2b4a7014', + 'differential.pkg.js' => '218fda21', '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' => '39dcf2c3', 'rsrc/js/application/diff/DiffChangesetList.js' => 'cc2c5de5', - 'rsrc/js/application/diff/DiffInline.js' => '008b6a15', + 'rsrc/js/application/diff/DiffInline.js' => '511a1315', 'rsrc/js/application/diff/DiffPathView.js' => '8207abf9', 'rsrc/js/application/diff/DiffTreeView.js' => '5d83623b', 'rsrc/js/application/differential/behavior-diff-radios.js' => '925fe8cd', @@ -778,7 +778,7 @@ return array( 'phabricator-dashboard-css' => '5a205b9d', 'phabricator-diff-changeset' => '39dcf2c3', 'phabricator-diff-changeset-list' => 'cc2c5de5', - 'phabricator-diff-inline' => '008b6a15', + 'phabricator-diff-inline' => '511a1315', 'phabricator-diff-path-view' => '8207abf9', 'phabricator-diff-tree-view' => '5d83623b', 'phabricator-drag-and-drop-file-upload' => '4370900d', @@ -919,9 +919,6 @@ return array( 'unhandled-exception-css' => '9ecfc00d', ), 'requires' => array( - '008b6a15' => array( - 'javelin-dom', - ), '0116d3e8' => array( 'javelin-behavior', 'javelin-dom', @@ -1397,6 +1394,9 @@ return array( 'javelin-stratcom', 'javelin-dom', ), + '511a1315' => array( + 'javelin-dom', + ), '5202e831' => array( 'javelin-install', 'javelin-dom', diff --git a/webroot/rsrc/js/application/diff/DiffInline.js b/webroot/rsrc/js/application/diff/DiffInline.js index 1e700855f1..705d95e70a 100644 --- a/webroot/rsrc/js/application/diff/DiffInline.js +++ b/webroot/rsrc/js/application/diff/DiffInline.js @@ -863,7 +863,7 @@ JX.install('DiffInline', { // If this was an empty box and we typed some text and then hit cancel, // don't show the empty concrete inline. - if (!this._isVoidContentState(this._originalState)) { + if (this._isVoidContentState(this._originalState)) { this.setInvisible(true); } else { this.setInvisible(false);