| Index: chrome/browser/resources/print_preview/print_header.js
|
| diff --git a/chrome/browser/resources/print_preview/print_header.js b/chrome/browser/resources/print_preview/print_header.js
|
| index 059fb05d26fdd43e1c2a9c7def9317a5cca8f386..59edff20b6e5e7406f56a3d2416af8a178354782 100644
|
| --- a/chrome/browser/resources/print_preview/print_header.js
|
| +++ b/chrome/browser/resources/print_preview/print_header.js
|
| @@ -69,6 +69,7 @@ cr.define('print_preview', function() {
|
| this.cancelButton_.disabled = !isEnabled;
|
| },
|
|
|
| + /** @param {string} message Error message to display in the print header. */
|
| setErrorMessage: function(message) {
|
| var summaryEl = this.getElement().getElementsByClassName(
|
| PrintHeader.Classes_.SUMMARY)[0];
|
| @@ -79,7 +80,6 @@ cr.define('print_preview', function() {
|
| /** @override */
|
| enterDocument: function() {
|
| print_preview.Component.prototype.enterDocument.call(this);
|
| - this.printButton_.focus();
|
|
|
| // User events
|
| this.tracker.add(
|
| @@ -220,6 +220,7 @@ cr.define('print_preview', function() {
|
| } else {
|
| this.printButton_.textContent = localStrings.getString('printButton');
|
| }
|
| + this.printButton_.focus();
|
| },
|
|
|
| /**
|
| @@ -232,6 +233,10 @@ cr.define('print_preview', function() {
|
| !this.printTicketStore_.isTicketValid() ||
|
| !this.isEnabled_;
|
| this.updateSummary_();
|
| + if (document.activeElement == null ||
|
| + document.activeElement == document.body) {
|
| + this.printButton_.focus();
|
| + }
|
| }
|
| };
|
|
|
|
|