Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: ui/login/account_picker/user_pod_row.js

Issue 2326833002: Submit button incompatiable with desktop chrome. (Closed)
Patch Set: Added null check. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/login/account_picker/user_pod_row.css ('k') | ui/login/account_picker/user_pod_template.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/login/account_picker/user_pod_row.js
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js
index 544aac18c12e093f292ca2e2353efa6a42e9ce0e..a65254b35c75fd0c87805324cd953cb9bc53a187 100644
--- a/ui/login/account_picker/user_pod_row.js
+++ b/ui/login/account_picker/user_pod_row.js
@@ -756,8 +756,10 @@ cr.define('login', function() {
this.passwordElement.addEventListener('input',
this.handleInputChanged_.bind(this));
- this.submitButton.addEventListener('click',
- this.handleSubmitButtonClick_.bind(this));
+ if (this.submitButton) {
+ this.submitButton.addEventListener('click',
+ this.handleSubmitButtonClick_.bind(this));
+ }
this.imageElement.addEventListener('load',
this.parentNode.handlePodImageLoad.bind(this.parentNode, this));
@@ -1131,7 +1133,8 @@ cr.define('login', function() {
},
set showError(visible) {
- this.submitButton.classList.toggle('error-shown', visible);
+ if (this.submitButton)
+ this.submitButton.classList.toggle('error-shown', visible);
},
toggleTransitions: function(enable) {
@@ -1854,7 +1857,8 @@ cr.define('login', function() {
* button color and state and hides the error popup bubble.
*/
updateInput_: function() {
- this.submitButton.disabled = this.passwordElement.value.length <= 0;
+ if (this.submitButton)
+ this.submitButton.disabled = this.passwordElement.value.length <= 0;
this.showError = false;
$('bubble').hide();
},
@@ -1875,6 +1879,8 @@ cr.define('login', function() {
handleInputChanged_: function(e) {
if (this.pinKeyboard)
this.pinKeyboard.value = this.passwordElement.value;
+ if (this.submitButton)
+ this.submitButton.disabled = this.passwordElement.value.length <= 0;
this.updateInput_();
},
« no previous file with comments | « ui/login/account_picker/user_pod_row.css ('k') | ui/login/account_picker/user_pod_template.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698