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

click-to-play: click handler on overlay too restrictive

RESOLVED FIXED in mozilla17

Status

()

Core
Plug-ins
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: keeler, Assigned: keeler)

Tracking

Trunk
mozilla17
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Basically, I did this wrong and now I'm fixing it. The patch should be pretty self-explanatory.
Created attachment 648111 [details] [diff] [review]
patch
Attachment #648111 - Flags: review?(jaws)
Comment on attachment 648111 [details] [diff] [review]
patch

Review of attachment 648111 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/base/content/browser-plugins.js
@@ +279,5 @@
>      // The overlay is null if the XBL binding is not attached (element is display:none).
>      if (overlay) {
>        overlay.addEventListener("click", function(aEvent) {
> +        // Have to check that the target is not the link to update the plugin
> +        if (!(aEvent.target instanceof HTMLAnchorElement) && 

Can you see if aEvent.originalTarget will work better here? See https://developer.mozilla.org/en-US/docs/DOM/event.originalTarget and https://developer.mozilla.org/en-US/docs/DOM/event/Comparison_of_Event_Targets#Use_of_explicitOriginalTarget_and_originalTarget for more information.

Also, can you include a test for this that checks clicking on the image, non-link text, and link text in the overlay?
Attachment #648111 - Flags: review?(jaws) → feedback+
Created attachment 649333 [details] [diff] [review]
patch v2

I was having trouble with EventUtils.synthesizeMouse until I figured out how it actually works and how to use it. In light of this, I decided it would be best to a) always pass in gTestBrowser.contentWindow and b) use synthesizeMouseAtCenter in all cases except where we specifically don't want to click the center. Let me know if this is too much scope creep, though.
Attachment #648111 - Attachment is obsolete: true
Attachment #649333 - Flags: review?(jaws)
Attachment #649333 - Flags: review?(jaws) → review+
https://tbpl.mozilla.org/?tree=Try&rev=2f25fd81809e ran green - marking checkin-needed.
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/532ff9ae12b8
Flags: in-testsuite+
Keywords: checkin-needed
Target Milestone: --- → mozilla17
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/532ff9ae12b8
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Updated

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