Closed
Bug 309316
Opened 19 years ago
Closed 18 years ago
WARNING: GetCharCode used for wrong key event; should use onkeypress., file ../../../../../mozilla/content/events/src/nsDOMKeyboardEvent.cpp, line 108
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: Biesinger, Assigned: timeless)
References
Details
Attachments
(1 file, 1 obsolete file)
3.14 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
linux gtk2 seamonkey trunk, checkout finish: So Sep 18 22:29:45 CEST 2005 Typing in the location bar shows a lot of: WARNING: GetCharCode used for wrong key event; should use onkeypress., file ../../../../../mozilla/content/events/src/nsDOMKeyboardEvent.cpp, line 108
Reporter | ||
Comment 1•19 years ago
|
||
(cc'ing dbaron since this is also seen in the layout debugger. but might this be an issue in the <textbox> xbl binding?)
Comment 2•19 years ago
|
||
I think the gtk2 native keybinding code calls GetCharCode on all key events.
Reporter | ||
Comment 3•19 years ago
|
||
-> widget:gtk2 then, I guess.
Assignee: guifeatures → blizzard
Component: XP Apps: GUI Features → Widget: Gtk
Product: Mozilla Application Suite → Core
QA Contact: gtk
Version: unspecified → Trunk
Comment 4•19 years ago
|
||
It seems the problem is that in nsXBLWindowKeyHandler::WalkHandlers[1] we unconditinally call nsDOMKeyboardEvent::GetCharCode if we have a nsINativeKeyBindings impl (which only GTK2 has, AFAIK). 1: <http://lxr.mozilla.org/seamonkey/source/content/xbl/src/nsXBLWindowKeyHandler.cpp#198>
Comment 5•19 years ago
|
||
See also http://lxr.mozilla.org/mozilla/source/layout/forms/nsTextControlFrame.cpp#393 . What's the right solution here? Should these two places only call GetCharCode in certain cases?
Comment 6•19 years ago
|
||
(In reply to comment #4) >http://lxr.mozilla.org/seamonkey/source/content/xbl/src/nsXBLWindowKeyHandler.cpp#198 This should probably check for aEventType == nsXBLAtoms::keypress first. I'm not sure what the best fix for nsTextControlFrame is offhand.
Comment 7•19 years ago
|
||
DOMEventToNativeKeyEvent is only used in nsTextControlFrame.cpp (in nsTextInputListener::KeyDown, ::KeyPress, ::KeyUp), so the method signature for DOMEventToNativeKeyEvent could easily be changed to take aEventType as well, for example.
Comment 8•19 years ago
|
||
Ginn Chen, I bet this is the bug you want to fix instead of making the change you made in bug 295228.
Attachment #214505 -
Flags: superreview?(bzbarsky)
Attachment #214505 -
Flags: review?(bzbarsky)
Updated•18 years ago
|
Attachment #214505 -
Flags: superreview?(bzbarsky)
Attachment #214505 -
Flags: superreview+
Attachment #214505 -
Flags: review?(bzbarsky)
Attachment #214505 -
Flags: review+
Assignee | ||
Comment 10•18 years ago
|
||
Comment on attachment 214505 [details] [diff] [review] draft for xbl mozilla/content/xbl/src/nsXBLWindowKeyHandler.cpp 1.30
Attachment #214505 -
Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 11•18 years ago
|
||
This caused bug 330133...
Comment 12•18 years ago
|
||
This is only partly fixed. The code in DOMEventToNativeKeyEvent() (see comment 5, comment 7) still spews warnings to the console.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 13•18 years ago
|
||
This isn't the cleanest way to do this, but it works.
Attachment #220215 -
Flags: superreview?(dbaron)
Attachment #220215 -
Flags: review?(dbaron)
Attachment #220215 -
Flags: superreview?(dbaron)
Attachment #220215 -
Flags: superreview+
Attachment #220215 -
Flags: review?(dbaron)
Attachment #220215 -
Flags: review+
Comment 14•18 years ago
|
||
Checked in.
Status: REOPENED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•