Closed
Bug 287461
Opened 19 years ago
Closed 19 years ago
Caret Browsing is hardbound to the F7 key and is unable to be overridden with javascript like F3, F5, etc.
Categories
(Firefox :: Keyboard Navigation, defect)
Tracking
()
RESOLVED
FIXED
Firefox1.5
People
(Reporter: lindsey, Assigned: kinger)
Details
(Keywords: helpwanted)
Attachments
(1 file, 2 obsolete files)
1.51 KB,
patch
|
neil
:
review+
shaver
:
approval-aviary1.1a2+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 I have an application that uses the function keys F1 through F12 for navigation. I am able to override F3, F5, etc, through use of the Javascript preventDefault() option, but unfortunatly it seems that the F7 key, which is bound to a Caret Browsing dialog and the caret browsing toggle, does not use Javascript events. It is actually bound in browser.xbl as an XBL handler (http://lxr.mozilla.org/aviary101branch/source/toolkit/content/widgets/browser.xml#780), which means that, as far as I can tell, there is no way to override it and stop it toggling caret browsing. The best solution that I can think of would be to move the F7 button to use the same Javascript events that F3, F5, etc use, thus allowing it to be overridden if desired. Reproducible: Always Steps to Reproduce: 1. Rebind F7 by using a Javascript event listener bound to keydown. 2. Use preventDefault() to stop the event from opening a dialog and toggling caret browsing. 3. Actual Results: Nothing - the dialog and toggle still appear. Expected Results: Allowed me to override F7 like I have done with F3, F5, etc, by using the preventDefault() function.
Comment 1•19 years ago
|
||
The reason the key is in the binding is so that any user of <browser> gets that keystroke for free. Otherwise developers are most likely to forget it, yet it is an important keystroke for accessibility -- for example in help, view source, even in Chatzilla content. I have no problem with using a different strategy to implement F7 to solve the problems discussed in this bug, but we should continue to support it. Sun Microsystems, especially, uses this feature for their screen reader strategy. Some users need the key to be able to select text without need for a mouse.
Keywords: helpwanted
Comment 2•19 years ago
|
||
Why not just role out a browser binding in the moz app that doesn't have the F7 handler?
(In reply to comment #2) > Why not just role out a browser binding in the moz app that doesn't have the F7 > handler? Unfortunately this isn't something we're able to do with our application at the moment. The (initial) goal is to be able to run it off a standard install of Firefox from a web server with no need to install extensions, etc. Who knows, our clients might even start using Firefox for general browsing, and some of them might want to use F7 :)
Assignee | ||
Comment 4•19 years ago
|
||
The proposal is not to remove this key, but to move it out of the binding. What I propose is: - move the key into one of the existing XUL keysets. - move the JS to browser.js or a more appropriate utility file if there is one. Aaron, would you consider a patch if I put one together?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 5•19 years ago
|
||
Brian, it's okay with me. Request r= from ginn.chen@sun.com and sr= from neil@parkway.cc.co.uk
Assignee | ||
Comment 6•19 years ago
|
||
Copying Ginn and Neil for feedback. Do you have any objections before I proceed with a patch to this key being moved out of the binding? My fix would likely be: - move the key to <keyset id="mainKeyset"> (browser-sets.inc) - Move the JS to browser.js
Assignee: aaronleventhal → brian
Comment 7•19 years ago
|
||
You should be able to make the browser binding respect preventDefault(): * Put the handler in the system event group (see bug 225563). * Check to see if preventDefault() was called on the event.
Assignee | ||
Comment 8•19 years ago
|
||
Neil, you mean something like this (not tested yet)?
Attachment #181269 -
Flags: review?(neil.parkwaycc.co.uk)
Comment 9•19 years ago
|
||
Comment on attachment 181269 [details] [diff] [review] Look for preventDefault That seems to work, although I'd prefer to see the !event.isTrusted after the || to avoid confusion over precedence.
Attachment #181269 -
Flags: review?(neil.parkwaycc.co.uk) → review+
Comment 10•19 years ago
|
||
Oh, and r+sr too for the xpfe version tweaked as per my comment.
Assignee | ||
Comment 11•19 years ago
|
||
Order in conditional is reversed here as requested. Neil, if it's OK can you check it in please (I've tested), I don't have checkin rights.
Attachment #181269 -
Attachment is obsolete: true
Attachment #181281 -
Flags: review?(neil.parkwaycc.co.uk)
Comment 12•19 years ago
|
||
Comment on attachment 181281 [details] [diff] [review] Updated patch You'll need approval, as the tree is currently frozen.
Attachment #181281 -
Flags: review?(neil.parkwaycc.co.uk) → review+
Comment 13•19 years ago
|
||
Brian, when the tree is open, I can check it in for you if need be ...
Comment 14•19 years ago
|
||
What about Mozilla Suite? Are you going to fix it?
Assignee | ||
Comment 15•19 years ago
|
||
(In reply to comment #14) > What about Mozilla Suite? > Are you going to fix it? Good point. Updated patch coming ...
Assignee | ||
Comment 16•19 years ago
|
||
Patch that now includes browser.xml of Mozilla Suite.
Attachment #181281 -
Attachment is obsolete: true
Attachment #181524 -
Flags: review?(neil.parkwaycc.co.uk)
Comment 17•19 years ago
|
||
Comment on attachment 181524 [details] [diff] [review] Include Mozilla Suite binding r+sr=me
Attachment #181524 -
Flags: review?(neil.parkwaycc.co.uk) → review+
Assignee | ||
Comment 18•19 years ago
|
||
I'd be grateful if any of you fine people could check this in once the tree is open again. Thanks!
Status: NEW → ASSIGNED
Assignee | ||
Comment 19•19 years ago
|
||
Seeking driver review for checkin to trunk.
Target Milestone: --- → Firefox1.1
Updated•19 years ago
|
Attachment #181524 -
Flags: approval-aviary1.1a2?
Comment on attachment 181524 [details] [diff] [review] Include Mozilla Suite binding a=shaver
Attachment #181524 -
Flags: approval-aviary1.1a2? → approval-aviary1.1a2+
Assignee | ||
Comment 21•19 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•