Note: There are a few cases of duplicates in user autocompletion which are being worked on.

click event not fired if element has been hidden by mouseup

RESOLVED FIXED in Firefox 15



Event Handling
5 years ago
5 years ago


(Reporter: Clochix, Assigned: roc)


({css2, regression})

css2, regression
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox15+ verified)



(2 attachments)



5 years ago
Created attachment 630142 [details]
Test case

I have an element with 2 event listeners:
* on mouseup, I hide the element with "display: none";
* on click, I trigger an action.

The action is no more triggered in latest nightly (BuildID: 20120603030523). "click" is not fired.
In Firefox 12 and Chromium, everything works as expected.

If I use "visibility: hidden" instead of "display: none", everything works fine.

I don't know if it's a bug or the expected behaviour.

Here's a test case: (same as attached file).


5 years ago
Keywords: css2, regression


5 years ago
Component: General → DOM: Events
OS: Linux → All
Product: Firefox → Core
QA Contact: general → events
Hardware: x86 → All
Version: 15 Branch → Trunk

Comment 1

5 years ago
Regression range, please.


5 years ago
Component: DOM: Events → Event Handling
Regression from bug 758179?
Attachment #630142 - Attachment mime type: text/plain → text/html
tracking-firefox15: --- → +
Created attachment 630457 [details] [diff] [review]

The fix for bug 758179 revealed this bug. Now, setting display:none on mouseup is automatically flushed so the frame is gone by the time we get around to dispatching click/dblclick in PostHandleEvent. This bug already existed though, since Web content itself could have caused a flush after setting elements to display:none in mouseup.

This patch reverts a bit of the patch for bug 401528. I've tested the testcases in that bug and they don't regress.
Assignee: nobody → roc
Attachment #630457 - Flags: review?(bugs)
This patch seems to fix bug 761483 as well.
Blocks: 761483

Comment 5

5 years ago
Comment on attachment 630457 [details] [diff] [review]

This is quite risky, but I don't have better ideas.
Attachment #630457 - Flags: review?(bugs) → review+

(Merged by Ed Morley)
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
Comment on attachment 630457 [details] [diff] [review]

Review of attachment 630457 [details] [diff] [review]:

Need to get this fixed on Aurora.
Attachment #630457 - Flags: approval-mozilla-aurora?


5 years ago
Depends on: 763014
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) (away June 9-19) from comment #8)
> Comment on attachment 630457 [details] [diff] [review]
> fix
> Review of attachment 630457 [details] [diff] [review]:
> -----------------------------------------------------------------
> Need to get this fixed on Aurora.

FYI - See bug 763014. I'm seeing bustage as a result of this fix that causes reproducible crashes upon double-clicking the top portion of a FF window.
Comment on attachment 630457 [details] [diff] [review]

[Triage Comment]
Approved for Aurora 15, since this appears to be a regression in that version.
Attachment #630457 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
In that case, we also need bug 763014 on Aurora at the same time.
status-firefox15: --- → fixed
Flags: in-testsuite+
Verified using the test case attached in the Description that the click event is fired (if element has been hidden by mouseup). 

Verified using Firefox 15 beta 3 on Windows 7, Ubuntu 12.04 and Mac OS X 10.6:
Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20100101 Firefox/15.0
Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0																			
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20100101 Firefox/15.0

After clicking on 'Set display to none' button the background text gets selected when hovering the mouse over - filed Bug 780582.
status-firefox15: fixed → verified


5 years ago
Depends on: 780582
You need to log in before you can comment on or make changes to this bug.