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

Unified Diff: chrome/browser/resources/pdf/pdf_scripting_api.js

Issue 889603005: Prevent the PDF iframe from being tab-focusable in print preview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « 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/pdf/pdf_scripting_api.js
diff --git a/chrome/browser/resources/pdf/pdf_scripting_api.js b/chrome/browser/resources/pdf/pdf_scripting_api.js
index 03f14de64b5ab03f585a70932ed494f9ac1a9d31..c0b06d19221f51da2bf076dd919747c147f2e82e 100644
--- a/chrome/browser/resources/pdf/pdf_scripting_api.js
+++ b/chrome/browser/resources/pdf/pdf_scripting_api.js
@@ -263,6 +263,8 @@ function PDFCreateOutOfProcessPlugin(src) {
iframe.setAttribute(
'src',
'chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html?' + src);
+ // Prevent the frame from being tab-focusable.
+ iframe.setAttribute('tabindex', '-1');
var client = new PDFScriptingAPI(window);
iframe.onload = function() {
client.setPlugin(iframe.contentWindow);
« 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