Closed
Bug 66742
Opened 24 years ago
Closed 23 years ago
[pp]Application crashes after closing a onkeydown event dialog
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: chrispetersen, Assigned: joki)
References
()
Details
(Keywords: crash, platform-parity)
Attachments
(4 files)
27.54 KB,
text/plain
|
Details | |
27.54 KB,
text/plain
|
Details | |
1016 bytes,
patch
|
Details | Diff | Splinter Review | |
1006 bytes,
patch
|
Details | Diff | Splinter Review |
Build: 2001012611
Platform: Mac only
Expected Results: Closing dialog should not crash the application.
What I got: Event handler is processed and dialog is displayed. Closin the
dilaog causes the crash.
Steps to reproduce:
1) Open http://slip/projects/marvin/html/a_onkeydown.html
2) Place focus on link by mousing down on it. Press a key on the keyboard.
3) The event onkeydown will be processed. Mouse up to remove focus off link.
4) Close the alert dialog. A crash should occur.
Reporter | ||
Comment 1•24 years ago
|
||
Reporter | ||
Comment 2•24 years ago
|
||
Reporter | ||
Updated•24 years ago
|
Summary: Application crashes after closing a onkeydown event dialog → [pp]Application crashes after closing a onkeydown event dialog
Comment 3•24 years ago
|
||
Reassigning QA Contact for all open and unverified bugs previously under Lorca's
care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
Assignee | ||
Comment 4•24 years ago
|
||
I'm gonna need some Mac help on this one. I'll set milestone to 0.9.1 since its
a crash and see if we can get it taken care of.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.1
Comment 5•24 years ago
|
||
nominating for dogfood (from sdagley's list of bugs that are good candidates for
our next release)
Keywords: nsdogfood
There is a javascript code that should open the Alert dialog box. But, this
dialog is not opened.
Comment 7•23 years ago
|
||
Assignee | ||
Comment 8•23 years ago
|
||
Looks good to me.
r=joki
Comment 9•23 years ago
|
||
The attached patch fixes two problems.
First, it ensures that a keypress event goes to the same widget/window that the
keydown event goes to. (note: joki says it's ok if the keyup goes to a
different window)
Second, this patch ensures that we don't use a focused widget which might have
been closed (and therefore deleted which could lead to a crash). It does this
by relying on a 2nd call to gEventDispatchHandler.GetActive() to not return a
bad window/widget.
Comment 10•23 years ago
|
||
sr=sfraser if you fix the spacing.
Comment 11•23 years ago
|
||
spacing adjusted to match code immediately around it; fix checked in
Comment 12•23 years ago
|
||
This change does not build under gcc on Mac OSX:
nsMacEventHandler.cpp: In method `PRBool
nsMacEventHandler::HandleKeyEvent(EventRecord &)':
nsMacEventHandler.cpp:1075: jump to case label
nsMacEventHandler.cpp:1060: crosses initialization of `class nsWindow *
checkFocusedWidget'
You need to move the declaration of checkFocusedWidget to a better place.
Comment 13•23 years ago
|
||
Dave Alverson--could you please apply a patch or a code snippet that does
compile?
Comment 14•23 years ago
|
||
Comment 15•23 years ago
|
||
new patch checked in; thanks!
Comment 16•23 years ago
|
||
Tested bug on win2000 BuildID: 2001061304
and macOS 8.6 BuildID:2001061308
The crash does not occur anymore.
Marking bug as verified.
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•