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

Unified Diff: chrome/renderer/resources/extensions/web_view.js

Issue 72843002: <webview>: Give tabIndex -1 so that tab order is not affected (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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/renderer/resources/extensions/web_view.js
diff --git a/chrome/renderer/resources/extensions/web_view.js b/chrome/renderer/resources/extensions/web_view.js
index 02b2416a336e97ae36c3d43942fddedc91fee793..04d9de29216737aac5b68206557ebdd8a18c78fa 100644
--- a/chrome/renderer/resources/extensions/web_view.js
+++ b/chrome/renderer/resources/extensions/web_view.js
@@ -204,11 +204,11 @@ WebViewInternal.prototype.createBrowserPluginNode_ = function() {
*/
WebViewInternal.prototype.setupFocusPropagation_ = function() {
if (!this.webviewNode_.hasAttribute('tabIndex')) {
- // <webview> needs a tabIndex in order to respond to keyboard focus.
- // TODO(fsamuel): This introduces unexpected tab ordering. We need to find
- // a way to take keyboard focus without messing with tab ordering.
+ // <webview> needs a tabIndex in order to be focusable.
+ // TODO(fsamuel): It would be nice to avoid exposing a tabIndex attribute
+ // to allow <webview> to be focusable.
// See http://crbug.com/231664.
- this.webviewNode_.setAttribute('tabIndex', 0);
+ this.webviewNode_.setAttribute('tabIndex', -1);
}
var self = this;
this.webviewNode_.addEventListener('focus', function(e) {
« 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