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

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

Issue 2454023002: MD Settings: Fix <select> search highlighting. (Closed)
Patch Set: Nt. 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
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..6a5d06ce9660745643347e6fc3516be84a7926b8 100644
--- a/chrome/browser/resources/settings/search_settings.js
+++ b/chrome/browser/resources/settings/search_settings.js
@@ -149,7 +149,12 @@ 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>. Just revealing the section is
+ // sufficient.
+ if (node.parentNode.nodeName != 'OPTION')
+ highlight_(node, textContent.split(request.regExp));
}
// Returning early since TEXT_NODE nodes never have children.
return;

Powered by Google App Engine
This is Rietveld 408576698