Closed
Bug 120209
Opened 24 years ago
Closed 23 years ago
Extra blur generated when popup windows open
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: bryner, Assigned: bryner)
References
Details
(Whiteboard: sun_621)
Attachments
(1 file)
4.24 KB,
patch
|
saari
:
review+
darin.moz
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
When a javascript popup window opens on Linux, we do something like:
focus html document
focus xul document
focus html document
whereas on win32, the first focus of the html document doesn't exist. The net
effect of this is that any popup window that has an onblur handler that closes
the window (which appears to not be uncommon), will close immediately.
Sites that demonstrate this bug:
http://www.c2it.com (from bug 107844)
http://www.panasonic.de/www/ProduktSrv/de/produkte/8431401440?InfoID=120708&RUBRIK=-1
(from bug 104297)
http://www.desktop-fx.com/wallpaper/pat_texture_001.htm (from bug 109645)
CC'ing people from all of these bugs, since my crash fix now exposes this problem.
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Comment 1•23 years ago
|
||
two more sites from bug http://bugzilla.mozilla.org/show_bug.cgi?id=123591 :
http://www.parker.gr/engjotter.html and
http://www.vudumedia.com/butano/ganadores.htm
It seems that this is a commonly used technique ...
Assignee | ||
Comment 2•23 years ago
|
||
Ok, I believe I've tracked down what's going on here, and why this happens on
Linux but not Windows.
On windows, we get a synchronous focusing of the webshell window as a result of
showing the widget (i.e. from window.open()). We then focus the HTML document
when window.focus() happens. That's all fine.
On linux, focus does not happen synchronously when a window is shown. So, we
continue executing the script and focus the HTML document. Then, at some later
time, we get a NS_GOTFOCUS for the webshell window, followed by NS_ACTIVATE.
This causes the toplevel document (the chrome document) to take focus; at that
point the onblur handler on the HTML document fires and the window is closed.
Note that if no onblur handler was attached, the succeeding NS_ACTIVATE would
restore focus memory and focus the HTML document. So, aside from DOM events
firing that shouldn't, focus will generally end up in the correct place.
saari and I talked about a possible fix which involves not firing a blur event
during NS_GOTFOCUS if the focus controller is suppressed and it also has a
different window as its focused window.
Assignee | ||
Comment 3•23 years ago
|
||
This is the fix saari and I discussed (I think). It seems to fix this problem
nicely, but it needs the usual battery of focus regression tests run against
it.
Assignee | ||
Comment 4•23 years ago
|
||
I've been running with this patch in my tree for a couple of weeks and haven't
noticed any bad effects from it. saari, can you r=?
Comment 5•23 years ago
|
||
Moving Netscape owned 0.9.9 and 1.0 bugs that don't have an nsbeta1, nsbeta1+,
topembed, topembed+, Mozilla0.9.9+ or Mozilla1.0+ keyword. Please send any
questions or feedback about this to adt@netscape.com. You can search for
"Moving bugs not scheduled for a project" to quickly delete this bugmail.
Target Milestone: mozilla1.0 → mozilla1.2
Comment 6•23 years ago
|
||
bryner, did you want to go forward with landing this patch?
Target Milestone: mozilla1.2 → ---
Comment 7•23 years ago
|
||
I'm doing a build right now on Mac, lemme run this through some quick tests and
I'll r=
Comment 8•23 years ago
|
||
Comment on attachment 70193 [details] [diff] [review]
preliminary patch
Add some comments describing what you're doing and this bug number, and go for
it. I can't break anything testing on mac. r=saari with comments
Attachment #70193 -
Flags: review+
Comment 9•23 years ago
|
||
Comment on attachment 70193 [details] [diff] [review]
preliminary patch
sr=darin (looks good)
Attachment #70193 -
Flags: superreview+
Updated•23 years ago
|
Attachment #70193 -
Flags: approval+
Comment 10•23 years ago
|
||
Comment on attachment 70193 [details] [diff] [review]
preliminary patch
a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Assignee | ||
Comment 11•23 years ago
|
||
checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 13•23 years ago
|
||
*** Bug 124285 has been marked as a duplicate of this bug. ***
Comment 14•23 years ago
|
||
with a 3 hour old CVS build, Linux, all links at
http://www.parker.gr/engjotter.html spawn a window that immediately closes
again. Is that another bug then?
Assignee | ||
Comment 15•23 years ago
|
||
No, same bug. Damn.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 16•23 years ago
|
||
Well, almost the same bug.
The difference here is that the popup window is opened via a mousedown handler,
so there is an odd ordering dependency because script event handlers are run
first. In this case, the script event handler opens a new window and
deactivates the original window, then the anchor element takes focus and
deactivates the popup window, so it gets a blur. It may be that we're actually
doing the right thing and this is poorly written HTML (certainly the problem
could be avoided if the author opened the popup via onclick instead of onmousedown).
Comment 17•23 years ago
|
||
What is the impact of this bug on typical users? Why would it be needed for MachV?
Assignee | ||
Comment 18•23 years ago
|
||
I spun off the second issue to bug 131651. Marking this bug Fixed.
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Updated•23 years ago
|
QA Contact: madhur → rakeshmishra
Comment 19•23 years ago
|
||
verified on the trunk build 2002-04-25-10-trunk on Linux Red hat 7.2
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
•