Emit resize events after making document changes during inline editing

Summary:
Ref T12634. Fixes T12633. These events allow the keyboard reticle to resize properly.

(I expect to possibly hide/disable the reticle in the future during edits, but at least make the behavior sensible for now.)

Test Plan:
  - Used "n" to select a block.
  - Clicked a line number in that block to start a new inline comment.
  - Saw reticle resize properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12634, T12633

Differential Revision: https://secure.phabricator.com/D17904
This commit is contained in:
epriestley
2017-05-16 07:11:43 -07:00
parent 665ff4fdf6
commit 1493f08272
2 changed files with 12 additions and 6 deletions

View File

@@ -438,6 +438,8 @@ JX.install('DiffInline', {
row = next_row;
}
JX.Stratcom.invoke('resize');
return first_meta;
},
@@ -516,6 +518,10 @@ JX.install('DiffInline', {
// After making changes to inline comments, refresh the transaction
// preview at the bottom of the page.
this.getChangeset().getChangesetList().redrawPreview();
// Emit a resize event so that UI elements like the keyboad focus
// reticle can redraw properly.
JX.Stratcom.invoke('resize');
},
_redraw: function() {