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

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

Issue 7240005: Prevent settings page from closing when someone clicks an <option> in a <select>. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 6 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 c5296397c2e884a91319d833739c8c078dbdf2ab..4186d1fb44345100fc7d9feb1dfbbe7316d24eef 100644
--- a/chrome/browser/resources/options/options_page.js
+++ b/chrome/browser/resources/options/options_page.js
@@ -699,6 +699,12 @@ cr.define('options', function() {
if (!topPage || topPage.isOverlay || !topPage.parentPage)
return;
+ // Don't close subpages if a user is clicking in a select element.
+ // This is necessary because WebKit sends click events with strange
+ // coordinates when a user selects a new entry in a select element.
Evan Stade 2011/06/23 02:05:05 add crbug link
+ if (event.srcElement.nodeName == 'SELECT')
+ 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.
« 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