click does not work on a plugin content when a plugin is just activated

VERIFIED FIXED in Firefox 17

Status

()

Core
Plug-ins
VERIFIED FIXED
5 years ago
3 years ago

People

(Reporter: Dennis Lichtenthäler, Assigned: gfritzsche)

Tracking

Trunk
mozilla18
x86
Mac OS X
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox14-, firefox15-, firefox16-, firefox17+ verified, firefox18 verified)

Details

Attachments

(2 attachments, 4 obsolete attachments)

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/15.0 Firefox/15.0a1
Build ID: 20120503030512

Steps to reproduce:

* Enable plugins.click_to_play in about:config
* Switch to a page with embedded flash content (i.e. youtube)
* Click "Click here to activate plugins." 


Actual results:

The flash content plays but interaction is not possible. The elements react to hovering correctly but clicking does not have any effect. Keyboard controls (tabbing through available elements) works however.
Once I switch to another tab and back, clicking works.


Expected results:

After activating the plugin, clicking should work.

Comment 1

5 years ago
Still present in FirefoxNightly 16.0a1 2012-06-13.
I reproduce this bug still on http://hg.mozilla.org/mozilla-central/rev/bb4b37094b9f.

(In reply to Dennis Lichtenthäler from comment #0) 
> Once I switch to another tab and back, clicking works.

I focus the other element in a same page, clicking works too.
Blocks: 71552
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

5 years ago
No longer blocks: 71552
Blocks: 711552
Summary: Unable to interact with plugin content when click to play is enabled → click does not work on a plugin content when a plugin is just activated

Comment 3

5 years ago
This bug happened:
* Firefox Beta    14.0b8
* Firefox Aurora  15.0a2 2012-06-23
* Firefox Nightly 16.0a1 2012-06-23

This bug should fix before release Firefox 14.
Blocks: 738698

Updated

5 years ago
Component: Untriaged → Plug-ins
Product: Firefox → Core
QA Contact: untriaged → plugins
No longer blocks: 711552

Updated

5 years ago
tracking-firefox14: --- → ?
tracking-firefox15: --- → ?
tracking-firefox16: --- → ?

Comment 4

5 years ago
(In reply to Yuki Keiichi from comment #3)
> This bug happened:
> * Firefox Beta    14.0b8
> * Firefox Aurora  15.0a2 2012-06-23
> * Firefox Nightly 16.0a1 2012-06-23
> 
> This bug should fix before release Firefox 14.

The setting is not yet user facing yet, so no need to track for release. Sending over to Jared for initial investigation.
Assignee: nobody → jaws
tracking-firefox14: ? → -
tracking-firefox15: ? → -
tracking-firefox16: ? → -
To note, I have only heard this reported with youtube.com.

I'm not sure what is happening there, but I talked with Margaret and we think that we should move the click-to-play event handler to the actual plugin instead of the overlay (bug 741130). That might fix this bug.

Re-assigning to dkeeler since he is going to work on fixing bug 741130.
Assignee: jaws → dkeeler
Depends on: 741130
Duplicate of this bug: 755094
(Reporter)

Comment 7

5 years ago
(In reply to Jared Wein [:jaws] from comment #5)
> To note, I have only heard this reported with youtube.com.
Yep, I'm unable to reproduce this with anything other than youtube videos.
(In reply to Dennis Lichtenthäler from comment #7)
> Yep, I'm unable to reproduce this with anything other than youtube videos.

I'm unable to reproduce this too. (on Today's nightly, http://hg.mozilla.org/mozilla-central/rev/e61399f31505 )
(In reply to OHZEKI Tetsuharu [:saneyuki_s] from comment #8)
> (In reply to Dennis Lichtenthäler from comment #7)
> > Yep, I'm unable to reproduce this with anything other than youtube videos.
> 
> I'm unable to reproduce this too. (on Today's nightly,
> http://hg.mozilla.org/mozilla-central/rev/e61399f31505 )

Oops! Sorry, I have missed the test.
This bug is REPRODUCED on Today's nightly on OSX 10.7, http://hg.mozilla.org/mozilla-central/rev/e61399f31505.
No longer depends on: 741130
Blocks: 774937
Duplicate of this bug: 775709
I can reproduce this too (Aurora 16.0a2 (2012-07-22))
(Assignee)

Updated

5 years ago
Assignee: dkeeler → georg.fritzsche
(Assignee)

Comment 12

5 years ago
This is bug is due to "mouseup" dom events not being sent to the plugin due to this check:
http://mxr.mozilla.org/mozilla-central/source/dom/plugins/base/nsPluginInstanceOwner.cpp#2098

Before the click is delivered, mContentFocused should be set to true here:
http://mxr.mozilla.org/mozilla-central/source/dom/plugins/base/nsPluginInstanceOwner.cpp#2083

However the "focus" dom event is never delivered to the pluginInstanceOwner with click-to-play. 
Still looking into how to properly fix this.
(Assignee)

Updated

5 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 13

5 years ago
Created attachment 649335 [details] [diff] [review]
Fix focus issue with click-to-play

With click-to-play enabled, the focus event was delivered before the actual plugin instance owner was loaded.
Fixed by syncing the focus state when the frame is set on the plugin instance owner.
(Assignee)

Comment 14

5 years ago
Comment on attachment 649335 [details] [diff] [review]
Fix focus issue with click-to-play

Josh, can you review this?
Attachment #649335 - Flags: review?(joshmoz)
This could really use a mochitest.
Flags: in-testsuite?
(Assignee)

Comment 16

5 years ago
Comment on attachment 649335 [details] [diff] [review]
Fix focus issue with click-to-play

Good point, post-poning review request until this has a test.
Attachment #649335 - Flags: review?(joshmoz)
(Assignee)

Comment 17

5 years ago
Created attachment 650956 [details] [diff] [review]
Fix & test for focus issue with click-to-play
(Assignee)

Updated

5 years ago
Attachment #649335 - Attachment is obsolete: true
(Assignee)

Comment 18

5 years ago
Pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=de8ccadbf88d
(Assignee)

Comment 19

5 years ago
Created attachment 651001 [details] [diff] [review]
Fix & test for focus issue with click-to-play, v3

The test failed on try, even on 10.6 which runs the test fine for me. 
Adjusted successive click tests to do the same thing to find out:
https://tbpl.mozilla.org/?tree=Try&rev=9786a523e1d9
Attachment #650956 - Attachment is obsolete: true
(Assignee)

Comment 20

5 years ago
"to (In reply to Georg Fritzsche [:gfritzsche] [away 11-19 Aug] from comment #19)
> Adjusted successive click tests to do the same thing to find out:
... if this is a problem with the test enviroment.
Created attachment 651559 [details] [diff] [review]
patch v4

Figured out the issue with the test not working. Georg said he'd be out for a bit, so I'll be shepherding this to landing. Asking for review from Josh.
Attachment #651001 - Attachment is obsolete: true
Attachment #651559 - Flags: review?(joshmoz)

Comment 22

5 years ago
Comment on attachment 651559 [details] [diff] [review]
patch v4

Excellent fix, thanks Georg and David!
Attachment #651559 - Flags: review?(joshmoz) → review+
This was the run: https://tbpl.mozilla.org/?tree=Try&rev=e88d375f6e57
Marking checkin-needed.
Keywords: checkin-needed
(In reply to David Keeler from comment #23)
> This was the run: https://tbpl.mozilla.org/?tree=Try&rev=e88d375f6e57

Green on Try.

https://hg.mozilla.org/integration/mozilla-inbound/rev/6943b37c68cc
Flags: in-testsuite? → in-testsuite+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6943b37c68cc
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Depends on: 783723
Sorry, backed out for bug 783723:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7a1a745a45f2
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla17 → ---
(Assignee)

Updated

5 years ago
Blocks: 784392
(Assignee)

Updated

5 years ago
Duplicate of this bug: 784392
(Assignee)

Comment 28

5 years ago
Created attachment 655568 [details] [diff] [review]
patch v5

* Fix intermittent failures through SimpleTest.waitForFocus()
* Avoid causing failures on subsequent tests if the test for this bug fails

Josh, can i carry over the r+ for this fixed patch?
Attachment #651559 - Attachment is obsolete: true
(Assignee)

Comment 29

5 years ago
(In reply to Georg Fritzsche [:gfritzsche] from comment #28)
> Created attachment 655568 [details] [diff] [review]
> patch v5

Try run for this patch:
https://tbpl.mozilla.org/?tree=Try&rev=7d088f4af68d

Comment 30

5 years ago
(In reply to Georg Fritzsche [:gfritzsche] from comment #28)

> Josh, can i carry over the r+ for this fixed patch?

Yes
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
(In reply to Georg Fritzsche [:gfritzsche] from comment #29)
> Try run for this patch:
> https://tbpl.mozilla.org/?tree=Try&rev=7d088f4af68d

Green on Try.

https://hg.mozilla.org/integration/mozilla-inbound/rev/31a27d47d242
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/31a27d47d242
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
This is important enough for CTP that it should be uplifted, I believe: see bug 792550 which is probably a dup and affects embedded youtube videos, which are one of the primary use cases that should work.
tracking-firefox17: --- → ?

Updated

5 years ago
tracking-firefox17: ? → +
Georg - please nominate for Aurora approval when you get the chance.
(Assignee)

Comment 35

5 years ago
Comment on attachment 655568 [details] [diff] [review]
patch v5

[Approval Request Comment]
Bug caused by: Click-to-play feature when active
User impact if declined: E.g. Youtube Flash not responding to button click unless switching tabs or otherwise refocusing plugin element.
Testing completed (on m-c, etc.): Been on nightly for a while, no negative feedback so far. Also verified locally.
Risk to taking this patch (and alternatives if risky): Low-risk, worst-case is probably causing other focus issues.
String or UUID changes made by this patch: none.
Attachment #655568 - Flags: approval-mozilla-aurora?
Attachment #655568 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(Assignee)

Comment 36

5 years ago
Created attachment 664068 [details] [diff] [review]
Aurora patch
(Assignee)

Comment 37

5 years ago
Attachment 664068 [details] [diff] needs checkin on Aurora.
Keywords: checkin-needed
https://hg.mozilla.org/releases/mozilla-aurora/rev/20a6963e3018
status-firefox17: --- → fixed
status-firefox18: --- → fixed
Keywords: checkin-needed
Keywords: verifyme
Depends on: 805330
After following the steps to reproduce from comment 0, I could not interact with the flash content on www.youtube.com or flash trailers in imdb.com for the build ID: 20120503030512.

For the same steps in comment 0 for 
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Firefox/17.0 beta 4
Build ID: 20121031065642
flash content is working on every mouse action. Also other flash content sites like trailers on imdb.com or vimeo.com.
status-firefox17: fixed → verified
Video controls are working fine with CTP enabled on Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:18.0) Gecko/18.0 Firefox/18.0. Verified fixed
Status: RESOLVED → VERIFIED
status-firefox18: fixed → verified
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.