Closed Bug 1161930 Opened 9 years ago Closed 9 years ago

Quick find shortcut both opens the findbar and types a slash in the inputbox

Categories

(Instantbird Graveyard :: Conversation, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nhnt11, Assigned: nhnt11)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Pressing the '/' key with the convbrowser focused (not the inputbox) both opens the findbar and types a slash.

I'm not sure what the expected behavior is. FWIW, I was trying to type a command, and did not expect quick find.
Have you checked the "Search for text when I start typing" preference in Advanced -> General -> Accessibility?
No, I have not. This happens only with the quick-find shortcut ('/').
Attached patch Tentative patch (obsolete) — Splinter Review
I had a bit of time earlier and came up with this quick fix. Not sure if there's a better way to do this.

I tried setting the disablefastfind attribute but it looks like that's only honoured for about: and chrome: URIs - https://dxr.mozilla.org/mozilla-central/source/toolkit/modules/BrowserUtils.jsm#277
Assignee: nobody → nhnt11
Status: NEW → ASSIGNED
Attachment #8606247 - Flags: review?(aleth)
Comment on attachment 8606247 [details] [diff] [review]
Tentative patch

Review of attachment 8606247 [details] [diff] [review]:
-----------------------------------------------------------------

Are you sure this isn't actually a regression due to recent changes in browser.xml that haven't been ported to the convbrowser fork?

Naively, https://dxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/browser.xml#383 looks different.

::: im/content/conversation.xml
@@ +1026,3 @@
>              document.getBindingParent(this).editor.focus();
> +            event.preventDefault();
> +            event.stopPropagation();

This hack seems a bit aggressive. At least only affect the bubbling for the slash key you are interested in?
Keywords: regression
Attached patch Much nicer patchSplinter Review
OK, I figured out why setting disablefastfind wasn't working before.
We needed to set the attribute on the content document's documentElement, which I had tried setting in the constructor of convbrowser. This doesn't work because when it loads an HTML page (the conversation), the attributes seem to get overwritten. This patch sets the attribute in onStateChange instead, which works fine.
Attachment #8606247 - Attachment is obsolete: true
Attachment #8606247 - Flags: review?(aleth)
Attachment #8624069 - Flags: review?(aleth)
Attachment #8624069 - Flags: review?(aleth) → review+
https://hg.mozilla.org/comm-central/rev/337208ca8df8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: