Closed Bug 891181 Opened 11 years ago Closed 11 years ago

Textbox-based <setting> bindings un-focus when forward slash (/) key is pressed

Categories

(Toolkit :: Add-ons Manager, defect)

22 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: githlar, Assigned: darktrojan)

Details

(Whiteboard: [qa-])

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release)
Build ID: 20130627161625

Steps to reproduce:

Created a Preferences.xul file for my extension, using the <setting> bindings to better integrate it into the browser. Then input a forward slash character (/).


Actual results:

Any time I input '/' into a textbox derived from <setting> (even custom bindings based on chrome://mozapps/content/extensions/setting.xml#setting-base) the focus moves from the textbox the user is currently typing in to the Firefox search bar.


Expected results:

Focus should remain in the textbox regardless of the printable character typed.
Component: Untriaged → Add-ons Manager
Product: Firefox → Toolkit
Ugh, gHeader.onKeyPress is doing this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: x86_64 → All
Attached patch patchSplinter Review
This should do the business. I can't think of anything else further up the event chain that it would affect.
Assignee: nobody → geoff
Status: NEW → ASSIGNED
Attachment #772550 - Flags: review?(bmcbride)
Hah! I was wondering if it was something to do with extensions.js. I had to look over the code in there in order to get my extension to load my preferences on certain actions from my preference (thankfully you all were wise enough to leave a global loadView() =D).

Is there a particular reason that gHeader uses the '/' character? I see from the code that it simply focuses on the search box. Is this to emulate the similar functions of the command-line UNIX programs man/less/nano, etc? To me that seems to be the only thing that makes sense. If that's the case it's not really a "feature" as much as bloat in my opinion. No sane person would equate the command-line search command available in a few UNIX applications to a GUI program. That is, unless it was just a handy macro used by the developers during developement that just didn't get removed.

Anyway, keep up the good work Geoff!
Slash has been associated with find at Mozilla since ancient times. It works on webpages too.
Attachment #772550 - Flags: review?(bmcbride) → review+
Keywords: checkin-needed
Marking as [qa-] based on Comment 5

> in-testsuite+
Whiteboard: [qa-]
https://hg.mozilla.org/mozilla-central/rev/f56958fbcc5b
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: