Closed Bug 561733 Opened 10 years ago Closed 10 years ago

Mouse click event in iframe doesn't fire

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Windows 7
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: frfxtst, Assigned: vingtetun)

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier: 20100426021931

When an "click" event for an iframe is registered by "addEventListener", the click event doesn't fire when clicked on the iframe. In Fennec version 1.0 this worked without problems. Please check attached example.

For add-ons which want to react on the click event, this is a pretty serious problem.

Reproducible: Always

Steps to Reproduce:
1. Unzip attached example
2. Open file "click_test.html" in fennec
3. Click on the iframe. When click event is fired, a Javascript alert with mouse coords is shown.
4. No Javascript alert is shown
Attached file Testcase
Attached patch PatchSplinter Review
Since 558488 we use let rect = getBoundingContentRect(element); instead of let rect = element.getBoundingClientRect(); before dispatching the mousedown/up events. Because of this change we don't need to check for the frameElement anymore because getBoundingContentRect already take the frames offset into account

https://bugzilla.mozilla.org/attachment.cgi?id=438742&action=diff#a/chrome/content/browser.js_sec1
Attachment #441662 - Flags: review?(mark.finkle)
Comment on attachment 441662 [details] [diff] [review]
Patch

Vivien, can you turn the testcase into a browser-chrome test?
Attachment #441662 - Flags: review?(mark.finkle) → review+
pushed m-b:
http://hg.mozilla.org/mobile-browser/rev/50d1fba364db

pushed m-1.1:
http://hg.mozilla.org/releases/mobile-1.1/rev/c3322493e578
Assignee: nobody → 21
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Port of the testcase to a browser-chrome test
Attachment #441990 - Flags: review?(mark.finkle)
Attachment #441990 - Flags: review?(mark.finkle) → review+
Thanks for the test Vivien
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.