Closed Bug 496879 Opened 16 years ago Closed 16 years ago

oncommand attribute on scrollbox is fired twice

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vingtetun, Assigned: vingtetun)

References

Details

Attachments

(1 file)

When the oncommand attribute is used on a <scrollbox oncommand="alert('hey')"/>, the command if fired twice. (It we inhibit one of the onmousedown/onmouseup event in ChromeInputModule#789, oncommand is fired once)
This seems to be related to bug 490873. In our case the click if fired twice, one time in sendSingleClick in ChromeInputHandler and another click is fired just after cause of the initial mousedown/mouseup. The reason why there is two 2 events is cause we call allowNextClick in sendSingleClick, and just after we call stopListening - so the click is fired from our calls to sendMouseEvent but allowNextClick stays to true for the next event. This patch just remove allowNextClick() call in sendSingleClick
OS: Linux → All
Hardware: x86 → All
Ben - We added the call for a different bug. What affect will this have on the original issue?
The click changes were added to handle the problem of a click being sent in chrome at the end of a drag. sendSingleClick is just used from content, so I think it will be OK. I'm in the process of testing the patch to see if I can find any bad behavior.
Comment on attachment 382296 [details] [diff] [review] Remove a allowNextClick The change is sound. That code is the only place using stopListener/startListener, so this looks complete to me. I didn't notice any bad effects while testing.
Attachment #382296 - Flags: review+
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
This bug also affect the current prefs panel, as two clicks are dispatched to the radio button when we try to change a pref and result to switch the value on the first click (as we want) and switch it back on the second click.
bugspam
Assignee: nobody → 21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: