icecats11 / js-hotkeys

Automatically exported from code.google.com/p/js-hotkeys
0 stars 0 forks source link

Function keys not overriding defaults in IE7 #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Open IE to the demo page, press any of the Function keys (F1 to F12), they
all cause the default action to occur in IE.

Original issue reported on code.google.com by ray73...@gmail.com on 6 Mar 2009 at 1:16

GoogleCodeExporter commented 8 years ago
Shame i can't edit my original post :(

What steps will reproduce the problem?
1. Go to the demo page using IE
2. Press any function key (F1 to F12)
3. Default action will happen (ie. press F3 and find dialog will open)

What is the expected output? What do you see instead?
I expected the dialog NOT to appear

What version of the product are you using? On what operating system?
IE7 on Windows Vista 32bit

Please provide any additional information below.

(borrowed this from Issue 42 as i have no idea how to fix it)

There is a relative easy way to fix this. The following javascript snippet 
could be inserted in the keydown listener:

// Only IE
if (window.event) {
  try { window.event.keyCode = 0; } catch(e) {/* Ignore */}
}

Original comment by ray73...@gmail.com on 6 Mar 2009 at 1:18

GoogleCodeExporter commented 8 years ago
fixed
see test-static-04.html example at github repo

Original comment by Afro.Sys...@gmail.com on 3 May 2009 at 8:57