[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdelibs/khtml/dom
From: Charles Samuels <charles () kde ! org>
Date: 2007-08-05 4:11:19
Message-ID: 1186287079.735402.27027.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 696502 by charles:
the js keyboard event (mozilla extension) property event returns 0
if the key pressed cannot be expressed as an ascii code (apparently).
This behavior is the same as Firefox, /more/ similar to Opera (although
opera appears to have an implementation of "event" more buggy than
konqueror as a result of this patch). I figure firefox's implementation
is canonical as it's a gecko extension.
Still, there's a remaining bug in that you can't send "ctrl-something"
because Konqueror filters it away from the Part. I'm not going to fix that.
M +6 -2 dom2_events.cpp
--- branches/KDE/3.5/kdelibs/khtml/dom/dom2_events.cpp #696501:696502
@@ -317,8 +317,12 @@
if( impl->isMouseEvent() )
return static_cast<MouseEventImpl*>( impl )->button() + 1;
else if( impl->isTextInputEvent() || impl->isKeyboardEvent() )
- return static_cast<KeyEventBaseImpl*>( impl )->keyCode();
-
+ {
+ // return 0 unless the key has an ascii value
+ if ( static_cast<KeyEventBaseImpl*>( impl )->keyVal() )
+ return static_cast<KeyEventBaseImpl*>( impl )->keyCode();
+ }
+
return 0;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic