Bug 62467 - Javascript keygrabbing kills keyboard navigation
Summary: Javascript keygrabbing kills keyboard navigation
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (other bugs)
Version First Reported In: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-10 22:58 UTC by Nick Welch
Modified: 2006-04-24 05:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Welch 2003-08-10 22:58:23 UTC
Version:            (using KDE KDE 3.1.2)
Installed from:    Debian testing/unstable Packages
OS:          Linux

The site in question is forums.anandtech.com.  They use some javascript keyboard grabbing for various things, but this nukes pageup/pagedown/home/end/arrows/etc in Konqueror.

The relevant javascript appears to be located at the very bottom of the source of each page, and involves document.onkeydown, window.event.altKey, and window.event.keyCode.  I don't really know any javascript, but I suspect that document.onkeydown is given priority over the built-in Konqueror navigation keybindings.

I did some testing, and this indeed does seem to be the problem.  I have a copy of a page at:

http://incise.org:82/~death/at.html

I made a single change; removing the "document.onkeydown = handleEvent;", and the keyboard functionality returns.  However, I also pasted this javascript into a rather plain page at:

http://incise.org:82/~death/foo.html

And the problem did not occur (keyboard navigation works correctly).  This seems to suggest that the problem is a combination of things.  I'm not sure what the other factors are though.
Comment 1 Nick Welch 2003-08-10 23:56:37 UTC
My mistake, the foo.html above DOES exhibit the same behavior.  I got a little 
feisty with copy/paste in vim and didn't notice that I totally messed up the 
javascript. 
 
So it seems that this narrows the problem down to simply document.onkeydown. 
Comment 2 Maksim Orlovich 2006-01-21 21:18:54 UTC
hmm, can't access the testcase.
Comment 3 lexual 2006-04-24 05:30:19 UTC
closing invalid, testcase no longer available.
Please let us know if this is still an issue for you.