Commit a0e69b93 authored by alekseys@chromium.org's avatar alekseys@chromium.org

Let buttons and select controls in Print Preview to handle Enter key.

BUG=276131

Review URL: https://codereview.chromium.org/189543003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255713 0039d316-1c4b-4281-b951-d872f2087c98
parent dd6b50cf
......@@ -769,9 +769,13 @@ cr.define('print_preview', function() {
!this.destinationSearch_.getIsVisible() &&
this.printTicketStore_.isTicketValid()) {
assert(this.uiState_ == PrintPreview.UiState_.READY,
'Trying to print when not in ready state: ' + this.uiState_);
this.printDocumentOrOpenPdfPreview_(false /*isPdfPreview*/);
e.preventDefault();
'Trying to print when not in ready state: ' + this.uiState_);
var activeElementTag = document.activeElement ?
document.activeElement.tagName.toUpperCase() : '';
if (activeElementTag != 'BUTTON' && activeElementTag != 'SELECT') {
this.printDocumentOrOpenPdfPreview_(false /*isPdfPreview*/);
e.preventDefault();
}
return;
}
......
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