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

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

Issue 2454023002: MD Settings: Fix <select> search highlighting. (Closed)
Patch Set: Revise. Created 4 years, 2 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 | 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..de59b6f04ffdd81c4222ac7d958f9d483f9f25d8 100644
--- a/chrome/browser/resources/settings/search_settings.js
+++ b/chrome/browser/resources/settings/search_settings.js
@@ -149,7 +149,11 @@ 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. Just revealing the section is sufficient.
dpapad 2016/10/27 01:24:48 Highlighting <select> elements with a search bubbl
+ 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