Commit 2c996437 authored by Denis Kuznetsov's avatar Denis Kuznetsov Committed by Commit Bot

Re-enable back button after offline signin attempt

Bug: 998078
Change-Id: I771a38eb571455bfe11e41cdf9bc5d191b6e212e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1782618
Commit-Queue: Denis Kuznetsov <antrim@chromium.org>
Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694287}
parent dbed3ca4
...@@ -49,11 +49,6 @@ ...@@ -49,11 +49,6 @@
this.switchToEmailCard(true /* animated */); this.switchToEmailCard(true /* animated */);
}, },
onAnimationFinish_: function() {
this.fire('backButton', !this.isEmailSectionActive_());
this.focus();
},
onForgotPasswordClicked_: function() { onForgotPasswordClicked_: function() {
this.disabled = true; this.disabled = true;
this.fire('dialogShown'); this.fire('dialogShown');
......
...@@ -804,6 +804,7 @@ Polymer({ ...@@ -804,6 +804,7 @@ Polymer({
this.email_ = ''; this.email_ = '';
this.authCompleted_ = false; this.authCompleted_ = false;
this.lastBackMessageValue_ = false; this.lastBackMessageValue_ = false;
this.setBackNavigationVisibility_(true);
// Reset SAML // Reset SAML
this.isSaml_ = false; this.isSaml_ = false;
...@@ -1239,13 +1240,10 @@ Polymer({ ...@@ -1239,13 +1240,10 @@ Polymer({
} }
this.isLoadingUiShown_ = true; this.isLoadingUiShown_ = true;
// Hide the back button and the border line as they are not useful when // Hide the back button and the border line as they are not useful when
// the loading screen is shown. // the loading screen is shown.
this.$['signin-back-button'].hidden = true; this.setBackNavigationVisibility_(false);
this.$['signin-frame-dialog'].setAttribute('hide-shadow', true);
// Also hide the primary and secondary action buttons
this.primaryActionButtonLabel_ = null;
this.secondaryActionButtonLabel_ = null;
// Clear any error messages that were shown before login. // Clear any error messages that were shown before login.
Oobe.clearErrors(); Oobe.clearErrors();
...@@ -1446,6 +1444,21 @@ Polymer({ ...@@ -1446,6 +1444,21 @@ Polymer({
this.updateGuestButtonVisibility_(); this.updateGuestButtonVisibility_();
}, },
/**
* Show/Hide back navigation during post-authentication.
* @param {boolean} visible Show/hide back navigation.
* @private
*/
setBackNavigationVisibility_: function(visible) {
this.$['signin-back-button'].hidden = !visible;
this.$['signin-frame-dialog'].setAttribute('hide-shadow', !visible);
if (!visible) {
// Also hide the primary and secondary action buttons
this.primaryActionButtonLabel_ = null;
this.secondaryActionButtonLabel_ = null;
}
},
/** /**
* @param {string} username * @param {string} username
* @param {ACTIVE_DIRECTORY_ERROR_STATE} errorState * @param {ACTIVE_DIRECTORY_ERROR_STATE} errorState
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment