Closed Bug 55784 Opened 24 years ago Closed 20 years ago

Double click causes click handler to fire twice

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

x86
All
defect

Tracking

()

RESOLVED DUPLICATE of bug 212720
Future

People

(Reporter: mik, Assigned: saari)

References

()

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.16 i686; en-US; m18) Gecko/20001002
BuildID:    2000100215

Double click on a link with onclick="window.open('abc.html','abcwin','.');"
causes mozilla
a) to open two new windows
d) to crash after amouse move

Reproducible: Always
Steps to Reproduce:
1.Open a page which has links opening new windows
2.Double-click on such a link
3.Move a mouse

Actual Results:  Mozilla first opens two new windows without content
and then crashes.

Expected Results:  One window should be open

Also, if I open one window with such a link, then close it
and then click a link again it takes very long to open a window
again.
Mikhail: could you provide the URL of a page that demonstrates this bug? 
works OK with Mozilla 2000100808 on windows 98
Added a link to a test page.
Once again, it's a Linux specific bug, not Windows.
mikhail: I tried to open the test page, but I get a file not found error. Can
you post it again?
Sorry, link is now valid again.
And it still allows to crask a browser build 2000101814
I can't duplicate it with Debian unstable and today's build (2000101821). Mik,
what Linux distribution are you using? 
I use Debian Woodie,  with Helix Gnome.  And in described situation in crashes
always.
I'll check this on neighbour Linuxes....
PS:  Also mentioned "slow open" problem has gone, now it opens windows with
acceptable speed.
Sawfish as your window manager then? Odd- that is the exact same setup that I
have. :| Sorry, I'll continue to try to duplicate it, but I'm having no luck
here.
Ok, here is what I saw on a neighbour PC:
When double-clicking on a link Mozilla opens two windows and not crashes.  But
this is still incorrect -- Only one window should be open because window name is
the same.  Also, if I issue a lot of sequental clicks mozilla will open as many
windows, as much i click.  So this looks related to some kind of performance
issue -- changing Summary
Summary: crash ahen double-clicking on a link which opens new window → Slow opening of a new window causes more then one window with the same name to be opened
This also happens on windows but without crash.
OS: Linux → All
Hrm. I don't know enough Javascript to know what the "correct" behavior ought to
be, but this is definitely different than the behavior in 4.x. I'm confirming,
though I don't know who should be taking responsibility for it now.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Browser, not engine. Reassigning to Event Handling for further triage. 
Confirming using Mozilla MN6 branch builds 2000102309 on WinNT, Linux.
Method: go to http://www.chel.com.ru/~mik/open/open.html            


When you single-click the link, only one window comes up. 
When you double-click on the link, however, two windows come up. 
In NN4.7 or IE4.7, only one window comes up, regardless of whether 
you single-click or double-click the link.


Note: on Linux, the two windows are coming up for me in different positions,
and are easy to see. On WinNT, they come up directly on top of each other,
so you cannot tell immediately that two windows have come up. 
Assignee: rogerl → joki
Component: Javascript Engine → Event Handling
QA Contact: pschwartau → lorca
I'll try to look at this for 0.9.1
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.1
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
So according to the spec this is correct.  Doubleclicks are just click events 
with appropriate context info.  If the script handler doesn't check the 
context info you'll get multiple windows.

We may be able to get a better compatibility mode for stuff like this.  But for 
now I'm futuring the bug.

An additional bug exists which allows multiple same-named windows to be opened.  
This is covered in bug 74176.
Summary: Slow opening of a new window causes more then one window with the same name to be opened → Double click causes click handler to fire twice
Target Milestone: mozilla0.9.1 → Future
QA contact updated
QA Contact: gerardok → madhur
Well now, isn't this bug quite the conundrum.  It's marked "critical" as if it
were important that it was fixed and yet also marked "Future" so it probably
isn't showing up on any important radars.  Which may be why it hasn't gotten
significant attention since last April.  Perhaps it could be given a different
target milestone.  

This bug has my vote.  I always notice my mom double clicking on standard links
like they were icons.  Just today I accidentally double clicked on a window.open
type of link and experienced this.  I agree this should be critical in terms of
usability.
I assume there is already code that catches double clicks based on system
settings.  Could this code be reused in this case?
QA Contact: madhur → rakeshmishra
Re comment 15: What spec? The DOM events spec doesn't specify when the HTML
event handler attributes should be triggered, and the HTML spec is a little
vague but doesn't suggest that two clicks should be generated for every doubleclick.
QA Contact: rakeshmishra → trix
.
Assignee: joki → saari
Status: ASSIGNED → NEW
QA Contact: trix → ian
Bug 189374 is a potential duplicate of this (if not then of bug 74176). It
includes a good testcase. If you double click either link quickly, you will get
two windows, whereas clicking and waiting for the window to open fully before
clicking again will only give you one.

*** This bug has been marked as a duplicate of 212720 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
I too noticed this. Especially on:

http://www.sunny971.com/listen.html

(Select click here to listen)


...using Firefox 0.9.3 permits a double click to launch 2 of these streaming
windows.

Usine IE - this works perfectly.

I hope this can be addressed?

Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.