Call center after reply dialog open promise resolves
On domains with plugins (e.g. chromium-review), viewing a diff in a change before actually viewing the change and then navigating to the change-view with the 'a' keyboard shortcut can cause the reply dialog to be improperly placed on the page. With this change, `_openReplyDialog` centers the dialog after it's opened. Bug: Issue 5506 Change-Id: Id72d428be8e6d8492a2c6d90be372163fad7b82d
This commit is contained in:
@@ -528,7 +528,6 @@
|
||||
|
||||
if (this.viewState.showReplyDialog) {
|
||||
this._openReplyDialog();
|
||||
this.async(function() { this.$.replyOverlay.center(); }, 1);
|
||||
this.set('viewState.showReplyDialog', false);
|
||||
}
|
||||
}.bind(this));
|
||||
@@ -542,7 +541,7 @@
|
||||
// another, so that the user's preference is restored.
|
||||
this.set('viewState.diffMode', null);
|
||||
this.set('_numFilesShown', DEFAULT_NUM_FILES_SHOWN);
|
||||
}
|
||||
}
|
||||
this.set('viewState.changeNum', this._changeNum);
|
||||
this.set('viewState.patchRange', this._patchRange);
|
||||
},
|
||||
@@ -838,6 +837,8 @@
|
||||
this.$.replyOverlay.open().then(function() {
|
||||
this.$.replyOverlay.setFocusStops(this.$.replyDialog.getFocusStops());
|
||||
this.$.replyDialog.open(opt_section);
|
||||
Polymer.dom.flush();
|
||||
this.$.replyOverlay.center();
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user