Merge "Do not reset comment tab once change is completely loaded"
This commit is contained in:
@@ -795,12 +795,9 @@
|
||||
}
|
||||
|
||||
_paramsChanged(value) {
|
||||
// Change the content of the comment tabs back to messages list, but
|
||||
// do not yet change the tab itself. The animation of tab switching will
|
||||
// get messed up if changed here, because it requires the tabs to be on
|
||||
// the streen, and they are hidden shortly after this. The tab switching
|
||||
// animation will happen in post render tasks.
|
||||
// TODO(dhruvsri): Fix underlining of comment tab when page loads
|
||||
this._currentView = CommentTabs.CHANGE_LOG;
|
||||
this._setPrimaryTab();
|
||||
if (value.view !== Gerrit.Nav.View.CHANGE) {
|
||||
this._initialLoadComplete = false;
|
||||
return;
|
||||
@@ -835,7 +832,6 @@
|
||||
}
|
||||
this._reloadPatchNumDependentResources().then(() => {
|
||||
this._sendShowChangeEvent();
|
||||
this._setPrimaryTab();
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -870,8 +866,6 @@
|
||||
|
||||
this._sendShowChangeEvent();
|
||||
|
||||
this._setPrimaryTab();
|
||||
|
||||
this.async(() => {
|
||||
if (this.viewState.scrollTop) {
|
||||
document.documentElement.scrollTop =
|
||||
|
||||
@@ -645,12 +645,9 @@ limitations under the License.
|
||||
assert.equal(element.$.commentTabs.selected, 1);
|
||||
assert.equal(element._currentView, CommentTabs.COMMENT_THREADS);
|
||||
|
||||
// When the change is partially reloaded (ex: Shift+R), the content
|
||||
// is swapped out before the tab, so messages list will display even
|
||||
// though the tab for comment threads is still temporarily selected.
|
||||
element._paramsChanged(element.params);
|
||||
assert.equal(element.$.commentTabs.selected,
|
||||
CommentTabs.COMMENT_THREADS);
|
||||
CommentTabs.CHANGE_LOG);
|
||||
assert.equal(element._currentView, CommentTabs.CHANGE_LOG);
|
||||
flush(() => {
|
||||
// Correct tab is selected after the patchset is changed
|
||||
|
||||
Reference in New Issue
Block a user