Only the searched section is displayed in the “More From Mozilla” page if the section name is cleared from the “Find in Settings” search box using the “Backspace” key
Categories
(Firefox :: Settings UI, defect, P3)
Tracking
()
People
(Reporter: srosu, Assigned: enndeakin)
References
Details
Attachments
(1 file, 1 external file)
|
473.02 KB,
image/gif
|
Details |
[Affected versions]:
- Firefox Nightly 98.0a1 (Build ID: 20220206212741)
- Firefox Release Candidate 97.0 (Build ID: 20220202182137)
[Affected Platforms]:
- Windows 10 x64
- MacOS 11.6
- Ubuntu 20.04
[Prerequisites]:
- Have the Firefox browser en-US build installed and opened.
- Have the “browser.search.region” pref set to the “US” value.
- Have the “browser.preferences.moreFromMozilla” pref set to the “true” value.
[Steps to reproduce]:
- Navigate to the “about:preferences” page.
- Search for “Firefox Mobile”/“Mozilla VPN”/”Mozilla Rally” using the “Find in Settings” search box.
- Delete the searched term by keeping the “Backspace” key pressed.
- Focus the “More From Mozilla” section.
- Observe the displayed sections.
[Expected result]:
- All the sections are displayed on the page.
[Actual result]:
- The section searched at step 2 is the only one displayed on the page.
[Notes]:
- All the sections from the “More From Mozilla” page are redisplayed after a page refresh.
- I have observed that this issue is also reproducible on the “Nightly Experiments” section from the "about:preferences" page.
- This issue is not reproducible when the searched term is deleted using the “x” button from the “Find in Settings” search box or by selecting the term and pressing the “Delete”/”Backspace” key.
- Attached is a screen recording of the issue.
| Reporter | ||
Updated•4 years ago
|
| Reporter | ||
Comment 1•4 years ago
|
||
I managed to reproduce this issue even if the "More From Mozilla" feature is turned off by the pref.
- I've tried to search for the "Nightly experiments" section using the steps from the bug's description and the behavior is also happening for this section.
Comment 2•4 years ago
|
||
Thanks Simona for verifying. Updating to help triage issue under Preferences component
Updated•4 years ago
|
Updated•4 years ago
|
Comment 3•4 years ago
|
||
This is an issue with the subItem logic that got added in bug 1667858.
The code for clearing subitems looks like this:
removeAllSearchIndicators(window, showSubItems) {
this.getFindSelection(window).removeAllRanges();
this.removeAllSearchTooltips();
this.removeAllSearchMenuitemIndicators();
// Make any previously hidden subitems visible again for the next search.
if (showSubItems && this.subItems.size) {
for (let subItem of this.subItems.keys()) {
subItem.classList.remove("visually-hidden");
}
}
this.subItems.clear();
}
When pressing backspace one by one, we hit this code for every keydown (input) event, and the first time, showSubItems is still false (it's equivalent to !query.length, here. So we don't remove the visually-hidden classes. But we do clear this.subItems, so when the same method gets called later and showSubItems is eventually true because there is no more query, this.subItems is an empty map and we don't remove any classes.
Neil, does the .clear call just need to live inside the if condition or is there a more complicated fix needed?
| Assignee | ||
Comment 4•4 years ago
|
||
Updated•4 years ago
|
| Assignee | ||
Comment 5•4 years ago
|
||
Couldn't get a test working for this. The failure only occurs when the delete key is held down and the test timing doesn't seem to be able to emulate this right.
Comment 7•4 years ago
|
||
| bugherder | ||
| Reporter | ||
Comment 8•4 years ago
|
||
I‘ve verified this issue using the latest Firefox Nightly 99.0a1 (Build ID: 20220223093800) on Windows 10 x64, macOS 11.6, and Ubuntu 20.04.
- All the sections are displayed on the “about:prefrences” pages after clearing the section name from the “Find in Settings” search box using the “Backspace” key.
Updated•4 years ago
|
Description
•