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

Unified Diff: chrome/browser/resources/options/options_page.js

Issue 7061007: Re-add workaround that allowed keyboard navigation of options pages to work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add bug reference Created 9 years, 7 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/options/options_page.js
diff --git a/chrome/browser/resources/options/options_page.js b/chrome/browser/resources/options/options_page.js
index 2d1093bdde7e6de689b47c707f314614cad06b3d..43606eb87437eba478a860ee67c9d3f7322cedc3 100644
--- a/chrome/browser/resources/options/options_page.js
+++ b/chrome/browser/resources/options/options_page.js
@@ -687,6 +687,15 @@ cr.define('options', function() {
if (!topPage || topPage.isOverlay || !topPage.parentPage)
return;
+ // Do nothing if the client coordinates are not within the source element.
+ // This occurs if the user toggles a checkbox by pressing spacebar.
+ // This is a workaround to prevent keyboard events from closing the window.
+ // See: crosbug.com/15678
+ if (event.clientX == -document.body.scrollLeft &&
+ event.clientY == -document.body.scrollTop) {
+ return;
+ }
+
// Don't interfere with navbar clicks.
if ($('navbar').contains(event.target))
return;
« 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