Closed Bug 741139 Opened 12 years ago Closed 12 years ago

Plugin placeholders wrapped in links can't be activated

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: martijn.martijn, Assigned: Margaret)

References

()

Details

(Keywords: testcase)

Attachments

(1 file, 1 obsolete file)

You need to have the "Tap to Play" setting enabled for plugins for this bug.

See url testcase, steps to reproduce:
- Tap on the 2nd or 3rd plugin placeholder.

Notice how you the page is going to http://google.com, because there is a link around the plugin placeholder.

I don't know what should be happening in this case, to be honest.
But it is impossible to activate the Flash plugin in this case.
I've seen this kind of markup on several site, related to Flash ads.
Hm, we're already capturing the click event during the capturing phase, and we're already calling preventDefault() here:

https://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js#1951

I think instead of preventDefault() we may want stopPropagation(), since I don't think we want other elements to be finding out about this click. We could try that and see what happens.
Attached patch patch (obsolete) — Splinter Review
It appears we need _both_ preventDefault() and stopPropagation().

I'm not sure exactly how preventDefault() works, but my guess is that it's not working the way we want here because the event handler is on a child of the link, not on the link itself. I'm also not sure why stopPropagation() by itself doesn't work (I tried, it doesn't), since I would think the link wouldn't find out about the event if we're calling stopPropagation(). All in all, this is confusing, but this patch seems to do the job.
Assignee: nobody → margaret.leibovic
Attachment #611888 - Flags: feedback?(jwein)
Attached patch patchSplinter Review
(Un-bitrotted to apply on top of the patch from bug 741128)
Attachment #611888 - Attachment is obsolete: true
Attachment #611888 - Flags: feedback?(jwein)
Attachment #612631 - Flags: review?(mark.finkle)
Attachment #612631 - Flags: feedback?(jwein)
Comment on attachment 612631 [details] [diff] [review]
patch

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

Margaret, can you add a mochitest for this?
Attachment #612631 - Flags: feedback?(jwein) → feedback+
(In reply to Jared Wein [:jaws] from comment #4)
> Comment on attachment 612631 [details] [diff] [review]
> patch
> 
> Review of attachment 612631 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Margaret, can you add a mochitest for this?

Sigh, we don't have mochitests for this mobile click-to-play UI. I saw you made lots of tests in bug 711552, which we should try to port over. However, I'm not sure if we've developed a way to add UI tests that interact with content, since our UI tests are all Java-based, so this may require some effort to figure out.
Oh ok, that's too bad.
Blocks: 744060
The testcase appears to work now in current trunk build (2012-04-14) on the Samsung Galaxy Nexus.
Margaret - Has this been fixed by a different patch?
I also can't reproduce this issue anymore, although I'm not sure what else would have fixed it.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Attachment #612631 - Flags: review?(mark.finkle)
I can reproduce it again with at least a trunk build from 30-4 (but also today's build) on the Galaxy Nexus. I haven't seen it on the Galaxy SII.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Never mind, I had Plugins disabled, so I guess that would be expected behavior.
There is not much visible difference between disabled plugin placeholder and click to play placeholder, btw.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → WORKSFORME
(In reply to Martijn Wargers [:mw22] (QA - IRC nick: mw22) from comment #11)
> Never mind, I had Plugins disabled, so I guess that would be expected
> behavior.
> There is not much visible difference between disabled plugin placeholder and
> click to play placeholder, btw.

Stephen Horlander was working on a new icon for the click to play overlay. Jared may know if that ended up in a bug somewhere.
Yes, there are plans to change the click-to-play icon to have a play triangle in it. See https://bugzilla.mozilla.org/show_bug.cgi?id=746859 for more details.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: