Closed Bug 1532931 Opened 5 years ago Closed 5 years ago

Searching “True” or “False” in about:preferences returns the same (bogus-looking) results

Categories

(Firefox :: Settings UI, defect, P5)

defect

Tracking

()

VERIFIED FIXED
Firefox 67
Tracking Status
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- verified

People

(Reporter: atrif, Assigned: danielleleb12, Mentored)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached image truefalse.gif

Affected versions

  • Firefox 66.0b13 (20190304101322)
  • Firefox 65.0 (20190124174741)
  • Firefox 65.0.2 (20190225143501)
  • Firefox 67.0a1 (20190305214137)

Affected platforms

  • macOS 10.13.6
  • Windows 10 x64
  • Windows 7 x64

Steps to reproduce

  1. Open Firefox and go to about:preferences.
  2. Select “Find in options”.
  3. Search for ”True” or “False” strings.

Expected result

  • Only searched strings are displayed.

Actual result

  • Displayed results are not containing the strings.

Regression range

  • This is not a recent regression as I can reproduce on 65.0 as well. I will investigate further in case of an old regression.

Additional Notes

  • Attached a screen recording with the issue.
Has Regression Range: --- → no
Has STR: --- → yes
Blocks: 1532735

This is hilarious, as bugs go, but it seems to have been this way since at least September 2017, so I don't think we need to prioritize heavily right now.

Really curious what is causing this though.

So this is happening because of an overly-eager checking of element attributes. A comment in findInPage.js says[0]:

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.

And it does indeed dutifully skip <menuitems>.

But not <radio>s, whose values are all either true or false, hence all the preferences displayed in the recording feature radio groups.

[0] https://searchfox.org/mozilla-central/rev/d6f8590a91b71d64a1d0471cac38b6aadbe2a6e2/browser/components/preferences/in-content/findInPage.js#372-375

comment #2 is on the money. This looks like it's been broken since the find in page feature first landed. I can mentor this. comment #2 also indicates what needs to happen - we need to also exclude "radio" items the same way we exclude "menuitem" ones.

Blocks: 1335905
Mentor: gijskruitbosch+bugs
See Also: → 1369719
Summary: Searching “True” or “False” in about:preferences returns the same results → Searching “True” or “False” in about:preferences returns the same (bogus-looking) results

Removing regressionwindow-wanted keyword based on Comment 3.

Has Regression Range: no → ---
See Also: → 1534329

Hope it was ok to submit the patch without being assigned (I didn't realize it would automatically leave a comment/attachment here). Sorry for any confusion!

Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/3338bffc95e3
Adds condition to prevent unexpected results when searching 'true' or 'false' in about:preferences. r=Gijs
Assignee: nobody → danielleleb12
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67

Verified as fixed on Firefox Nightly 67.0a1 (2019-03-14) on Windows 10 x 64 and Ubuntu 16.04 x64 and Mac OS X 10.14.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: