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

VERIFIED FIXED in Firefox 67

Status

()

defect
P5
normal
VERIFIED FIXED
3 months ago
3 months ago

People

(Reporter: atrif, Assigned: danielleleb12, Mentored)

Tracking

(Blocks 1 bug)

Trunk
Firefox 67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox65 wontfix, firefox66 wontfix, firefox67 verified)

Details

Attachments

(2 attachments)

Reporter

Description

3 months ago
Posted 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.
Reporter

Updated

3 months ago
Has Regression Range: --- → no
Has STR: --- → yes
Reporter

Updated

3 months ago
Blocks: 1532735

Comment 1

3 months ago

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 3

3 months ago

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
Assignee

Comment 6

3 months ago

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!

Comment 7

3 months ago
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

Updated

3 months ago
Assignee: nobody → danielleleb12
Status: NEW → ASSIGNED

Comment 8

3 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67

Comment 9

3 months ago

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.