Closed Bug 14857 Opened 25 years ago Closed 25 years ago

replace 'ondblclick' with 'onmousedown' + event.clickCount == 2

Categories

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

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: waterson, Assigned: waterson)

References

Details

sfraser: I heard a rumor that this problem occurring on Mac, as well. Is it
limited to the tree control?
Status: NEW → ASSIGNED
Target Milestone: M11
Priority: P3 → P1
I recently fix the clickCount bug to conform with the DOM spec.  Basically this
means if you used to handle dblclick you should now handle mousedown with a
clickCount of 2.  I grepped through to find the spots where we used dblclick to
modify them to handle both cases (until all the widget libs are up to speed).
Did I miss a case?
Double clicking on rows in the tree works fine for me, especially since I fixed
the Mac event dispatching to do double-click detection properly. So I don't know
if there is any real problem here.
Summary: 'ondblclick' handlers fail to fire in tree control → replace 'ondblclick' with 'onmousedown' + event.clickCount == 2
ok, cool, that was it. joki: did you grep through the JS & XUL files for
'ondblclick', as well?
joki: am I understanding this correctly? 'ondblclick' is now broken? If so, do
we need to fix all the following instances:

http://lxr.mozilla.org/seamonkey/search?string=ondblclick

...to use

  onmousedown="if (event.clickCount == 2) { /* do whatever ondblclick did
before */ }"

Or should 'ondblclick' still work?
No, we should be replacing them.  I'm not sure about the ones in the activeX
control, I'll need to look more closely at that.  But the others should change.
Blocks: 11501, 12799
oh this is evil. my 'mark and sweep' algorithm is breaking because of RDF
containers, which add assertions that are dependent on the current state of the
graph; e.g., RDF:nextVal.

So, for example, what happens is that you have an RDF container with two
elements in it. You refresh the file. The two elements stream in, and are added
as '3' and '4', instead of being recognized as the same '1' and '2' again.
Since '1' and '2' aren't marked, they get swept. Since sweeping happens after
assertion, the values disappear. UGh.
No longer blocks: 11501, 12799
Oh damn. Ignore the previous comments. I added them to the wrong.
I applied the suggested fix to bookmarks, but it does not work. clickCount
reports either 1 or 3, but never 2 on linux. I have not tried windows yet.
Blocks: 11986
clickCount works fine on Windows.
Blocks: 15481
event.clickCount works on Linux now too, so I converted the bookmarks panel, the
related links panel, the bookmarks window, and the history window over to use
it.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I think rjc fixed this.
marking verified per reporter comments.
Status: RESOLVED → VERIFIED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.