Closed
Bug 189374
Opened 22 years ago
Closed 21 years ago
Double click fires event handlers twice too fast ( cause opening two window with same name )
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 212720
People
(Reporter: j.macgowan, Assigned: danm.moz)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20021223
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20021223
When double clicking on any <A target="windowname"> or onClick="window.open"
link, two identical windows will open even though they have the same window
name. Problem does not occur if you pause between clicks.
Reproducible: Always
Steps to Reproduce:
1.Create a link with a target set to a unique name
2.Double click on link
Actual Results:
Two identical windows appear
Expected Results:
One window should appear
Can reproduce problem on Mozilla 1.0. Cannot reproduce problem on IE 6, Opera 7,
Netscape 4.75.
Comment 1•22 years ago
|
||
Sorry, I could not see any reson to do one window apearing on double click.
according to w3c doc, every click on window produce 1 onclick event, so double
click is 2 such events. Well, IE think that exists "ondoubleclick" event, as I
see (second example don't work in IE). Of course, Mozilla could not use IE
proprietary way.
(p.S. And I dp not mention non-windows platform yet)
Reporter | ||
Comment 2•22 years ago
|
||
The problem isn't that two windows opened, it is that two windows with the same
window name where created. Two windows with the same window name should not be
allowed to happen. The second click should have refreshed the first window.
If target="_new" then two windows should have been created.
Comment 3•22 years ago
|
||
reporter, please attach a testcase
Reporter | ||
Comment 4•22 years ago
|
||
The URL above the summary field, goes to a testcase. I'll repost it here.
http://204.244.106.200/testarea/testwindowclick.html
The second test link on that page doesn't work in IE. I haven't bothered looking
into why that is.
If I remember right, Opera and Netscape 4.76 properly refreshed the first window
without opening a second one. So Mozilla is the only browser that works
differently, AFAIK.
(Bug 74146, as I just mentioned in that bug, is something else entirely.) The
opening comment in bug 55784 mentions named windows. I'd close this one as a
duplicate of 55784, but I find 55784 confusing reading. It's describing multiple
bugs which may have been related to each other at the time (Oct 2000) but today
some of them seem no longer to be bugs at all. This bug is at least more focused
and current.
I'm confirming; click twice quickly on a link which opens a named window and
Mozilla does indeed open two windows. Whether it should open two windows is
debatable (IE doesn't) and probably isn't important. But two windows with the
same name is a problem. Scripts could get confused.
The bug is a timing issue, of course. The problem is that the window's name is
stored in the content docshell. As it should be. It's the name of the content
DOM window after all. The content docshell doesn't get its name until it's been
loaded, and it can't be loaded until the chrome docshell has finished loading.
If a second "new window" command comes through while the chrome docshell is
(asynchronously) loading, you can get two windows with the same name.
Hmmm. Nine months old and no takers. I guess I'll give this one a home.
Assignee: asa → danm-moz
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 7•21 years ago
|
||
Actually, you can open as many new window as you wish, each of which has a same
name, only if you click the link(or button) quick enough.
I use "Gecko/200450516 Firefox/0.80+" under Windows XP.
And, Netscape 7.1 has the same problem.
"Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.4) Gecko/20030624
Netscape/7.1 (ax)"
Comment 8•21 years ago
|
||
*** This bug has been marked as a duplicate of 212720 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Component: Browser-General → Event Handling
Resolution: --- → DUPLICATE
Summary: Double click opens two window with same name → Double click fires event handlers twice too fast ( cause opening two window with same name )
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
•