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

Unified Diff: chrome/browser/resources/settings/search_settings.js

Issue 2454023002: MD Settings: Fix <select> search highlighting. (Closed)
Patch Set: Use loadScript. Created 4 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 | chrome/test/data/webui/settings/cr_settings_browsertest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/search_settings.js
diff --git a/chrome/browser/resources/settings/search_settings.js b/chrome/browser/resources/settings/search_settings.js
index 0a74ff014beefc354ab7e74e53af65ccf67e2417..d349f9223bb38bf6302bfd59134b8418264073f9 100644
--- a/chrome/browser/resources/settings/search_settings.js
+++ b/chrome/browser/resources/settings/search_settings.js
@@ -149,7 +149,13 @@ cr.define('settings', function() {
if (request.regExp.test(textContent)) {
foundMatches = true;
revealParentSection_(node, request.rawQuery_);
- highlight_(node, textContent.split(request.regExp));
+
+ // Don't highlight <select> nodes, yellow rectangles can't be
+ // displayed within an <option>.
+ // TODO(dpapad): highlight <select> controls with a search bubble
+ // instead.
+ if (node.parentNode.nodeName != 'OPTION')
+ highlight_(node, textContent.split(request.regExp));
}
// Returning early since TEXT_NODE nodes never have children.
return;
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/cr_settings_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698