Closed Bug 96086 Opened 23 years ago Closed 22 years ago

F9 toggles sidebar even with JavaScript override

Categories

(Core :: DOM: Events, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED INVALID
mozilla1.2alpha

People

(Reporter: BJames, Assigned: samir_bugzilla)

References

()

Details

(Keywords: access, embed, helpwanted)

I/NET, Inc. is the creator of Webulator/400, an HTML emulation program to access 
the IBM AS/400 computer.  As part of the emulation, we have a plugin that traps 
all function key presses (F1-F24, PageUp, PageDown, etc.) to send them to the 
host for specific functionality.  We have also created a key trapper style 
JavaScript that helps with this in the new releases (0.9.3) of Mozilla.  The 
problem is that, no matter what we do, the F9 key continues to be used by the 
browser to toggle the My Sidebar functions on and off.  Is there a way (through 
HTML, JavaScript, or user configuration) that we can stop this toggle action?  
In addition, might you have other suggestions for our desired functionality?  
This does the same thing in Netscape 6.x and I have also submitted it to their 
support site.

Thanks,
Bill James
I/NET, Inc.
marking NEW.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: access, embed
Perhaps some of the information in "The Customizing Document" is of use?

http://www.mozilla.org/unix/customizing.html#keys
if the key was bound using xbl you could.  i think for now you'd need to create 
a localization that didn't have the binding.
Thanks for the information so far -- both of these (I think) involve a rebuild 
of the browser product with specialization code.  Our users are varied enough 
that it is unrealistic for us to provide a specific version of the browser 
ourselves.  What I am looking for is something that will dynamically tell the 
browser to not use the F9 key for toggling the My Sidebar.  Ideally, something 
in the HTML (a <BODY> tag perhaps) would work the best for our purposes.  
Alternatively, some configuration setting (that the user can easily do 
themselves) would also work.
Is there possibly some additional javascript that I can include in the HTML to 
tell the browser not to perform its F9 (My Sidebar) functionality? We are 
currently using the "document.onkeydown = keyDown;", "document.onkeyup = keyUp;" 
and "document.captureEvents(Event.KEYDOWN | Event.KEYUP);" functions to capture 
all key presses and return '0' for any function key press that we find (which 
tells the browser not to do anything more with that key), but F9 continues to do 
its own thing.  For more details, you can also check out the js code at 
http://www.inetmi.com/support/netscape6.js
if you want to support mozilla, why not implement this as its own chrome 
application? then you wouldn't have this problem which in my book is a wontfix. 
html web content has no right to interfere w/ chrome application behaviors.

Your emulator would of course not include a sidebar but could have whatever 
buttons it needed.
I guess my support of Mozilla boils down to two points:
1) The javascript code that we are using seems to eat every other key available, 
including F1 (which would normally bring up Help) and F5 (which usually does a 
refresh). It seems buggy to me that the F9 key does not also follow the same 
rules - if F9 does what it always does, no matter what, then so should F1 and 
F5 (not to mention all the other keys on the keyboard).
2) My applications are available to the general Internet public and are also 
distributed to many customer servers. This makes the use of a unique chrome 
application almost impossible (unless there's some invisible way to distribute 
it on the fly that I don't know about).
yes f1 will be fixed shortly (ie you should lose it rsn) i think that's bug 
88739.

i still think chrome is your only realistic solution.
Summary: F9 toggle of My Sidebar even with JavaScript override → F9 toggles sidebar even with JavaScript override
-> Samri, sidebar keyboard issues
Assignee: aaronl → sgehani
You can't stop F5 from causing a reload just as you can't stop F9 from opening
the sidebar.  I don't see how this is a sidebar issue per se.  Maybe some of the
DOM folks can comment.
Assignee: sgehani → joki
Component: Keyboard Navigation → DOM Events
QA Contact: sairuh → vladimire
There are a number of folks who use Javascript to control what happens at the 
browser.  Our javascript (found at http://www.inetmi.com/support/netscape6.js) 
basically traps the keys as they are pressed and perform some action based on 
each of them.  In the example on the following link, the return value is 
discussed: 
http://developer.netscape.com/docs/manuals/communicator/jsref/evnt.htm#1010270
It is generally understood that the "return false;" indication eats the request 
and no further browser action is taken.  This actually seems to currently be the 
case with F1, F5, and all the other keys except F9 - they all do what our code 
instructs them to do and not Help, Refresh, etc.  I can clearly understand if 
the javascript code was not in place, F9 should toggle the sidebar (just as F1 
displays Help and F5 causes a Refresh when our code is not activated) - but, 
since it is, the F9 key should be eaten by the false return and the browser 
should not react to the F9 key at all.
Actually, it does sound like sidebar is capturing the events instead of
responding on the events on the bubbling phase.

And yes, they should be able to stop this action via content.

Back to Samir, ask me for help if you need it.
Assignee: joki → sgehani
Priority: -- → P3
Target Milestone: --- → mozilla0.9.9
Spilling over to mozilla1.0.  Help will be appreciated.
Keywords: helpwanted
Target Milestone: mozilla0.9.9 → Future
Target Milestone: Future → mozilla1.0
Moving Netscape owned 0.9.9 and 1.0 bugs that don't have an nsbeta1, nsbeta1+,
topembed, topembed+, Mozilla0.9.9+ or Mozilla1.0+ keyword.  Please send any
questions or feedback about this to adt@netscape.com.  You can search for
"Moving bugs not scheduled for a project" to quickly delete this bugmail.
Target Milestone: mozilla1.0 → mozilla1.2
Blocks: 139421
To cancel the default behaviour of F5, F9 etc. you should call
eventObj.preventDefault() upon the onkeypress event (see
http://www.mozilla.org/docs/dom/domref/dom_event_ref31.html).

Also see bug 139421.

Marking INVALID.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
verifying
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.