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

Unified Diff: chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js

Issue 2565573002: arc: Change default button to 'Agree' for Arc OOBE OptIn page. (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js
diff --git a/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js b/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js
index 75456ea745fa1e43dd115aa798826ba9a75df04c..a33f9cfaf966e369f39f07157f52486d20e0da99 100644
--- a/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js
+++ b/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js
@@ -151,6 +151,8 @@ login.createScreen('ArcTermsOfServiceScreen', 'arc-tos',
var skipButton = this.ownerDocument.createElement('button');
skipButton.id = 'arc-tos-skip-button';
+ skipButton.disabled = this.classList.contains('arc-tos-loading');
+ skipButton.classList.add('preserve-disabled-state');
skipButton.textContent =
loadTimeData.getString('arcTermsOfServiceSkipButton');
skipButton.addEventListener('click', function(event) {
@@ -233,6 +235,9 @@ login.createScreen('ArcTermsOfServiceScreen', 'arc-tos',
this.classList.remove('arc-tos-loaded');
this.classList.remove('error');
this.classList.add('arc-tos-loading');
+
+ $('arc-tos-accept-button').disabled = true;
+ $('arc-tos-skip-button').disabled = true;
},
/**
@@ -250,10 +255,9 @@ login.createScreen('ArcTermsOfServiceScreen', 'arc-tos',
var acceptButton = $('arc-tos-accept-button');
var skipButton = $('arc-tos-skip-button');
+ skipButton.disabled = false;
acceptButton.disabled = false;
- if (document.activeElement != skipButton) {
- acceptButton.focus();
- }
+ acceptButton.focus();
var termsView = $('arc-tos-view');
var termsViewContainer = $('arc-tos-view-container');
@@ -276,6 +280,8 @@ login.createScreen('ArcTermsOfServiceScreen', 'arc-tos',
this.classList.remove('arc-tos-loading');
this.classList.remove('arc-tos-loaded');
this.classList.add('error');
+
+ $('arc-tos-retry-button').focus();
},
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698