Closed
Bug 215928
Opened 21 years ago
Closed 21 years ago
onDblClick event handler IS fired on select multiple form element, WHEN clicking on scroll controls
Categories
(SeaMonkey :: General, defect, P2)
SeaMonkey
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: scunliffe, Assigned: roc)
References
Details
Attachments
(2 files, 1 obsolete file)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
janv
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
This is a new issue (didn't happen previously in Mozilla)
If an onDblClick event handler (attribute on the select tag) is added to a
select-multiple form element, it gets fired off, when a user double clicks on
the scroll controls (arrow up, thumb screw, arrow down). This is very anoying,
since users will click the arrows repeatedly to scroll a list. Since the
dblClick event is ideal for 'special' selection of an item in a list, any
JavaScript code attached to the event, will now either fail/behave strangly, as
there will not actually be a "selected" item in the list.
Reproducible: Always
Steps to Reproduce:
1. Create an HTML <select/> element with a size > 1, more options than the
specified size, and an onDblClick event handler.
2. Double Click on the scroll controls in the list.
Actual Results:
onDblClick event handler is fired, when it is not expected.
Expected Results:
I would expect the previous behavior / behaviour of other browser/form controls,
whereby the onDblClick event is only fired, upon DblClicking an item in the list.
Although I haven't tested yet, this may apply to a size=1 <select/> list, and
this may also apply to the <textarea/> element as well.
A Simple Test case will be attached shortly.
Comment 1•21 years ago
|
||
The "untested" patch in bug 207637 should fix this bug... it doesn't look like
it will be used to fix bug 207637, but it should happen at some point, probably.
Depends on: 207637
Assignee | ||
Comment 3•21 years ago
|
||
I think we should definitely stop scroll events from bubbling but I'm not sure
that the patch in bug 207637 is the right way to do it. It might be better to
just add some event handlers to the <scrollbar> XBL and cancel bubbling there.
CCing Neil...
Assignee: general → roc+moz
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Priority: -- → P2
Hardware: PC → All
Comment 4•21 years ago
|
||
Like this?
Assignee | ||
Comment 5•21 years ago
|
||
Yeah, like that, but for all mouse events :-)
I don't suppose you know what the overhead is for adding these handlers? Would
we pay a per-scrollbar space cost, or are the handlers shared?
Comment 6•21 years ago
|
||
Oh right: mouseover, mouseout, any others?
Also, each scrollbar event handler costs, although peterv was working on sharing
xbl event handlers - input and textarea have a large number of handlers.
Assignee | ||
Comment 7•21 years ago
|
||
http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-MouseEvent
So "click", "mousedown", "mouseup", "mouseover", "mousemove", "mouseout" (I
guess "dblclick" is our extension ... don't know if we have any other mouse
event extensions)
I wonder how bloaty it would be to add all these. Could be fairly bloaty for
pages with lots of comboboxes/listboxes. Shared event handlers sure would be
nice, which bug is that? Maybe this should depend on that bug.
Comment 8•21 years ago
|
||
Do you want events on scrollbars to be ignored by capturing handlers too?
I don't think that's possible in XBL...
Assignee | ||
Comment 9•21 years ago
|
||
I think it's OK for event capturers to capture events that happen in scrollbars.
In that case they're not delivered to the scrollbar, right? The thing we want to
avoid is events that cause two actions.
Comment 10•21 years ago
|
||
Here's a list from nsDOMEvent.cpp:
mousedown mouseup click dblclick mouseover mouseout mousemove contextmenu
dragenter dragover dragexit dragdrop draggesture
I'm not sure which of the drag messages we should block, if any.
Assignee | ||
Comment 11•21 years ago
|
||
Let's not block any drag events for now. I hope that drags not initiated by a
scrollbar get captured by the initiator anyway, and our scrollbar shouldn't be
initiating drags.
Comment 12•21 years ago
|
||
Updated•21 years ago
|
Attachment #129687 -
Attachment is obsolete: true
Assignee | ||
Comment 13•21 years ago
|
||
You want to delete the first "contextmenu" line, right?
Comment 14•21 years ago
|
||
That line stops an apparently unwanted context menu popping up on a
browser/frame/tree when you right-click its scrollbar.
See bug 74380, bug 74688 and bug 149474.
Assignee | ||
Comment 15•21 years ago
|
||
Comment on attachment 131348 [details] [diff] [review]
Proposed patch
OK, I get it now. I'm not sure if it's really legit for me to r+ this one...
Attachment #131348 -
Flags: superreview?
Comment 16•21 years ago
|
||
Comment on attachment 131348 [details] [diff] [review]
Proposed patch
Fixing roc's + for him.
Attachment #131348 -
Flags: superreview?
Attachment #131348 -
Flags: superreview+
Attachment #131348 -
Flags: review?(bryner)
Comment 17•21 years ago
|
||
Comment on attachment 131348 [details] [diff] [review]
Proposed patch
Review hokey-cokey...
Attachment #131348 -
Flags: review?(bryner) → review?(varga)
Updated•21 years ago
|
Attachment #131348 -
Flags: review?(varga) → review+
Comment 18•21 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 19•21 years ago
|
||
*** Bug 190632 has been marked as a duplicate of this bug. ***
Comment 20•21 years ago
|
||
would this patch fix bug 227742 in Firefox?
Comment 21•20 years ago
|
||
I've noticed a similar issue with command events for which I'll file a new bug.
Updated•20 years ago
|
Product: Browser → Seamonkey
Comment 22•20 years ago
|
||
*** Bug 215472 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•