diff --git a/resources/celerity/map.php b/resources/celerity/map.php --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -13,7 +13,7 @@ 'core.pkg.js' => 'ab3502fe', 'dark-console.pkg.js' => '187792c2', 'differential.pkg.css' => 'ffb69e3d', - 'differential.pkg.js' => '68a2e7be', + 'differential.pkg.js' => '442567d7', 'diffusion.pkg.css' => '42c75c37', 'diffusion.pkg.js' => '78c9885d', 'maniphest.pkg.css' => '35995d6d', @@ -385,7 +385,7 @@ 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8', 'rsrc/js/application/diff/DiffChangeset.js' => 'd7d3ba75', 'rsrc/js/application/diff/DiffChangesetList.js' => 'cc2c5de5', - 'rsrc/js/application/diff/DiffInline.js' => 'a5f196da', + 'rsrc/js/application/diff/DiffInline.js' => 'fdebbba6', 'rsrc/js/application/diff/DiffInlineContentState.js' => '68e6339d', 'rsrc/js/application/diff/DiffPathView.js' => '8207abf9', 'rsrc/js/application/diff/DiffTreeView.js' => '5d83623b', @@ -788,7 +788,7 @@ 'phabricator-dashboard-css' => '5a205b9d', 'phabricator-diff-changeset' => 'd7d3ba75', 'phabricator-diff-changeset-list' => 'cc2c5de5', - 'phabricator-diff-inline' => 'a5f196da', + 'phabricator-diff-inline' => 'fdebbba6', 'phabricator-diff-inline-content-state' => '68e6339d', 'phabricator-diff-path-view' => '8207abf9', 'phabricator-diff-tree-view' => '5d83623b', @@ -1871,10 +1871,6 @@ 'javelin-install', 'javelin-dom', ), - 'a5f196da' => array( - 'javelin-dom', - 'phabricator-diff-inline-content-state', - ), 'a77e2cbd' => array( 'javelin-behavior', 'javelin-stratcom', @@ -2235,6 +2231,10 @@ 'fdc13e4e' => array( 'javelin-install', ), + 'fdebbba6' => array( + 'javelin-dom', + 'phabricator-diff-inline-content-state', + ), 'ff688a7a' => array( 'owners-path-editor', 'javelin-behavior', diff --git a/webroot/rsrc/js/application/diff/DiffInline.js b/webroot/rsrc/js/application/diff/DiffInline.js --- a/webroot/rsrc/js/application/diff/DiffInline.js +++ b/webroot/rsrc/js/application/diff/DiffInline.js @@ -612,7 +612,7 @@ // read and preserve the text so "Undo" restores it. var state = null; if (this._editRow) { - state = this._readFormState(this._editRow); + state = this._getActiveContentState().getWireFormat(); JX.DOM.remove(this._editRow); this._editRow = null; } @@ -856,7 +856,7 @@ }, cancel: function() { - var state = this._readFormState(this._editRow); + var state = this._getActiveContentState().getWireFormat(); JX.DOM.remove(this._editRow); this._editRow = null; @@ -909,28 +909,6 @@ } }, - _readFormState: function(row) { - var state = this._newContentState(); - - var node; - - try { - node = JX.DOM.find(row, 'textarea', 'inline-content-text'); - state.text = node.value; - } catch (ex) { - // Ignore. - } - - node = this._getSuggestionNode(row); - if (node) { - state.suggestionText = node.value; - } - - state.hasSuggestion = this._getActiveContentState().getHasSuggestion(); - - return state; - }, - _getSuggestionNode: function(row) { try { return JX.DOM.find(row, 'textarea', 'inline-content-suggestion'); @@ -1043,7 +1021,7 @@ return null; } - var state = this._readFormState(this._editRow); + var state = this._getActiveContentState().getWireFormat(); if (this._isVoidContentState(state)) { return null; }