Bug 1532931 - Adds condition to prevent unexpected results when searching 'true' or 'false' in about:preferences. r=Gijs
authordanielleleb <danielleleb12@gmail.com>
Mon, 11 Mar 2019 18:18:15 +0000
changeset 521410 3338bffc95e30eb488aa3da2789bd50ee80a0260
parent 521409 7d64886307e5b72f2425ec990590653b5f71dc5c
child 521411 a52a29b099bb46766007651c4418435ae68aa963
push id10866
push usernerli@mozilla.com
push dateTue, 12 Mar 2019 18:59:09 +0000
treeherdermozilla-beta@445c24a51727 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1532931
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1532931 - Adds condition to prevent unexpected results when searching 'true' or 'false' in about:preferences. r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D23012
browser/components/preferences/in-content/findInPage.js
--- a/browser/components/preferences/in-content/findInPage.js
+++ b/browser/components/preferences/in-content/findInPage.js
@@ -366,17 +366,17 @@ var gSearchResultsPane = {
       // Access key are presented
       let complexTextNodesResult = this.highlightMatches(accessKeyTextNodes, nodeSizes, allNodeText.toLowerCase(), searchPhrase);
 
       // Searching some elements, such as xul:button, have a 'label' attribute that contains the user-visible text.
       let labelResult = this.queryMatchesContent(nodeObject.getAttribute("label"), searchPhrase);
 
       // Searching some elements, such as xul:label, store their user-visible text in a "value" attribute.
       // Value will be skipped for menuitem since value in menuitem could represent index number to distinct each item.
-      let valueResult = nodeObject.tagName !== "menuitem" ?
+      let valueResult = nodeObject.tagName !== "menuitem" && nodeObject.tagName !== "radio" ?
         this.queryMatchesContent(nodeObject.getAttribute("value"), searchPhrase) : false;
 
       // Searching some elements, such as xul:button, buttons to open subdialogs
       // using l10n ids.
       let keywordsResult =
         nodeObject.hasAttribute("search-l10n-ids") &&
         await this.matchesSearchL10nIDs(nodeObject, searchPhrase);