Closed Bug 1418033 Opened 8 years ago Closed 7 years ago

Make it possible to disable fast find

Categories

(Toolkit :: Find Toolbar, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox57 --- wontfix
firefox58 --- wontfix
firefox59 --- wontfix
firefox63 --- fixed
firefox99 --- affected

People

(Reporter: evilpies, Assigned: evilpies)

References

Details

Attachments

(2 files, 1 obsolete file)

I think a lot of people find "fast find" annoying and would rather completely disable it. At least the shortcuts `/` and `'` can get in the way of getting stuff done. https://twitter.com/paddykontschak/status/931226720098758656
I tend to agree. I would support disabling this feature by default.
Priority: -- → P3
Generally the preferences here are a bit messy (see bug 254592 and friends), and it's not clear to me if there's currently a way to do this, if there should be but it's somehow broken, or if there just isn't a "turn the whole thing off" pref right now. So this may be a dupe, but I'm not entirely sure. Mike's away until January, but in the meantime, I guess we would take a patch if it dealt appropriately with the tangle of existing prefs. I'm not sure about disabling the feature by default, that'd probably want some UX feedback.
See Also: → 696191
Assignee: nobody → evilpies
Attachment #8975604 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8975604 [details] [diff] [review] Make it possible to disable fast find. r? Mike's a better reviewer for this.
Attachment #8975604 - Flags: review?(gijskruitbosch+bugs) → review?(mdeboer)
Thanks for writing a patch! This seems like a good start. At some point in the future, perhaps based on telemetry data, we might consider whether to disable this by default. Having this preference available would then let us make that decision as easily as changing the default value. In the meantime, having a preference that people can disable will help those who regularly run into this problem.
Comment on attachment 8975604 [details] [diff] [review] Make it possible to disable fast find. r? Review of attachment 8975604 [details] [diff] [review]: ----------------------------------------------------------------- Kudos for the positive pref name that doesn't talk about 'disabling' stuff, but rather about 'enabling' it. This is only missing one piece: a (regression) unit test! Can you please add one for me to check out in this bug? Thanks!! ::: toolkit/modules/RemoteFinder.jsm @@ +334,5 @@ > "accessibility.typeaheadfind.linksonly"); > XPCOMUtils.defineLazyPreferenceGetter(RemoteFinder, "_findAsYouType", > "accessibility.typeaheadfind"); > +XPCOMUtils.defineLazyPreferenceGetter(RemoteFinder, "_manualFAYT", > + "accessibility.typeaheadfind.manual"); Not that I care a whole lot about allowing this to be available as a runtime switch, but it does seem that this wouldn't do it, whilst you're trying hard to do so in findbar.xml... I'm not sure it's worth fixing at this point - but since we're repeating this pattern in RemoteFinder.jsm, we might need a followup bug (not one you should feel obliged to take on, but I won't stop you ;-) ) to fix that up.
Attachment #8975604 - Flags: review?(mdeboer) → review+
(In reply to Mike de Boer [:mikedeboer] from comment #7) > ::: toolkit/modules/RemoteFinder.jsm > @@ +334,5 @@ > > "accessibility.typeaheadfind.linksonly"); > > XPCOMUtils.defineLazyPreferenceGetter(RemoteFinder, "_findAsYouType", > > "accessibility.typeaheadfind"); > > +XPCOMUtils.defineLazyPreferenceGetter(RemoteFinder, "_manualFAYT", > > + "accessibility.typeaheadfind.manual"); > > Not that I care a whole lot about allowing this to be available as a runtime > switch, but it does seem that this wouldn't do it, whilst you're trying hard > to do so in findbar.xml... Why not? defineLazyPreferenceGetter updates the property if the pref changes, I think...?
(In reply to :Gijs (he/him) from comment #8) > Why not? defineLazyPreferenceGetter updates the property if the pref > changes, I think...? Ah ok, I'm sorry for the confusion... it's getting a bit late here ;-)
Any hints for testing this? I found some tests that Invoke browser.finder directly, but I am looking for something that uses the shortcuts and makes sure it doesn't open.
Flags: needinfo?(mdeboer)
Apology for the late reply, Tom! I think you'll find a good example test at https://searchfox.org/mozilla-central/source/toolkit/content/tests/browser/browser_findbar.js
Flags: needinfo?(mdeboer)
Attachment #8975604 - Attachment is obsolete: true
Comment on attachment 8987299 [details] [diff] [review] Make it possible to disable fast find. r? Review of attachment 8987299 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/content/widgets/findbar.xml @@ +325,5 @@ > return; > > let prefsvc = this._self._prefsvc; > + if (!prefsvc) > + return; For some reason the test I added throws after finishing the run with: 0:03.47 PASS Findbar should still be hidden. - 0:03.48 INFO Leaving test bound test_hotkey_disabled 0:03.51 FAIL uncaught exception - TypeError: prefsvc is undefined at observe@chrome://global/content/bindings/findbar.xml:334:15 _receiveMessageAPI@chrome://mochikit/content/tests/SimpleTest/SpecialPowersObserverAPI.js:348:20 ChromePowers.prototype._receiveMessage@chrome://mochikit/content/tests/SimpleTest/ChromePowers.js:83:14 ChromePowers.prototype._sendSyncMessage@chrome://mochikit/content/tests/SimpleTest/ChromePowers.js:40:11 _setPref@chrome://mochikit/content/tests/SimpleTest/specialpowersAPI.js:1402:12 _applyPrefs@chrome://mochikit/content/tests/SimpleTest/specialpowersAPI.js:1245:9 popPrefEnv/<@chrome://mochikit/content/tests/SimpleTest/specialpowersAPI.js:1165:9 popPrefEnv@chrome://mochikit/content/tests/SimpleTest/specialpowersAPI.js:1158:12 flushPrefEnv/<@chrome://mochikit/content/tests/SimpleTest/specialpowersAPI.js:1178:7 flushPrefEnv@chrome://mochikit/content/tests/SimpleTest/specialpowersAPI.js:1176:12 nextTest/<@chrome://mochikit/content/browser-test.js:768:36 nextTest@chrome://mochikit/content/browser-test.js:768:13 async*testScope/test_finish/<@chrome://mochikit/content/browser-test.js:1392:11 run@chrome://mochikit/content/browser-test.js:1329:9
Attachment #8987299 - Flags: review?(mdeboer)
Attachment #8987300 - Flags: review?(mdeboer)
Comment on attachment 8987299 [details] [diff] [review] Make it possible to disable fast find. r? Review of attachment 8987299 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/content/widgets/findbar.xml @@ +378,5 @@ > > prefsvc.addObserver("accessibility.typeaheadfind", > this._observer); > + prefsvc.addObserver("accessibility.typeaheadfind.manual", > + this._observer); You need a matching removeObserver call to make this not continue to be accessed once the binding is dead. There's some existing ones for the other prefs in this file already. Then you can remove the early return.
Comment on attachment 8987299 [details] [diff] [review] Make it possible to disable fast find. r? Review of attachment 8987299 [details] [diff] [review]: ----------------------------------------------------------------- r=me with Gijs' suggestion implemented. Thanks, Tom!
Attachment #8987299 - Flags: review?(mdeboer) → review+
Comment on attachment 8987300 [details] [diff] [review] Test for disabled manual FAYT. r? Review of attachment 8987300 [details] [diff] [review]: ----------------------------------------------------------------- Yeah, I think the other tests make sure that the reverse pref setting continues to work. Thanks for this test, looks nice & simple. ::: toolkit/content/tests/browser/browser_findbar_disabled_manual.js @@ +6,5 @@ > + ["accessibility.typeaheadfind.manual", false], > + ]}); > +}); > + > +// Makes sure that the findbar hotkeys (' and /) have no effect nit: missing dot. @@ +8,5 @@ > +}); > + > +// Makes sure that the findbar hotkeys (' and /) have no effect > +add_task(async function test_hotkey_disabled() { > + // Opening new tab nit: missing dot.
Attachment #8987300 - Flags: review?(mdeboer) → review+
Thanks for review and the hint with removeObserver.
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/c3559084af4a Make it possible to disable fast find. r=mikedeboer https://hg.mozilla.org/integration/mozilla-inbound/rev/3e50b1960713 Test for disabled manual FAYT. r=mikedeboer
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Is this change a good candidate for uplift to beta? It does come up on support forums from time to time. While user scripts (and probably content scripts) can intercept and discard / and ' in many cases, there are no workarounds for some other pages, such as the calculator on the Google search results page.

This is happening for me as of today.

It's a really really weird one. Doesn't always happen. And has a very strange combination of factors required for it to occur.

Could be related to a bug in Outlook for the web. But I feel like Firefox should handle the situation better.

In outlook for the web, when composing an email, attempting to type "you're" brings up quick search. But only if I've put three or more letters after Hi and before a comma on the first line. See GIF for demo.

I have:

Hi Ha,

Hope you

Typing an apostrophe here works.

But if I have:

Hi Har,

Hope you

and then type an apostrophe after the you, the quick search bar opens.

See GIF and screenshots of console and Quick Find in link below:
https://imgur.com/a/rkifEbA

See Also: → 1764199

Thanks :the_new_mr, I've filed a separate bug for this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1764199

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: