Open Bug 983283 Opened 10 years ago Updated 2 years ago

Firefox stops accepting keyboard input with windowed X11 plugins

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86_64
Linux
defect

Tracking

()

People

(Reporter: catlee, Unassigned)

Details

(Keywords: regression, testcase-wanted)

In recent nightlies, Firefox sometimes stops accepting keyboard input. It's on a per-window basis. e.g. right now I'm entering this bug report in one window where I can enter text, but in another window none of the key presses seem to have any effect.
This happens quite a bit when I go to YouTube.
I've also hit it when going to Vidyo's web admin pages. So maybe it's flash related?
It seems like flash sometimes steals keyboard focus and doesn't let it go. Sometimes hitting 'f' in the stuck window will cause the youtube player to go full screen, even if it's not the active tab.
someone in #developers suggested you might know how to go about debugging this?
Flags: needinfo?(jschoenick)
This is occurring on X11? Returning focus to firefox should cause all native events to go to firefox instead of the plugin at the display server level -- have you changed window managers or anything recently?

If you catch this happening, if you can find the plugin in question in the inspector and see if it's being passed any "wmode" parameter (or, if you have a plugins.force.wmode pref for some reason). Input works differently in NPAPI-Windowless mode, which can be triggered by e.g. wmode=transparent.
Flags: needinfo?(jschoenick)
Yes, in X11. Doesn't matter if the window has focus or not.

I'm using the 'awesome' window manager. It, and lots of other X-related things, have probably been updated a few times since filing this bug.
The player element looks like this:
<embed type="application/x-shockwave-flash" src="https://s.ytimg.com/yts/swfbin/player-vflmTHkPE/watch_as3.swf" name="movie_player" id="movie_player" flashvars="no_get_video_log=1&amp;aid=P9hpbq2TYSQ&amp;rmktEnabled=1&amp;ldpj=-20&amp..." allowfullscreen="true" allowscriptaccess="always" bgcolor="#000000">
Component: General → Event Handling
Product: Firefox → Core
Ehsan says this is our fault because when killing plugin-container doesn't fix the problem.
Summary: Firefox stops accepting keyboard input → Firefox stops accepting keyboard input with windowed X11 plugins
(In reply to Chris AtLee [:catlee] from comment #8)
> Ehsan says this is our fault because when killing plugin-container doesn't
> fix the problem.

When killing plugin-container, do you see the "plugin crashed" dialog as expected? It would be interesting if you could reproduce this in a debug build, IIRC there's a few asserts related to nsPluginInstanceOwner's event handling that will go off if its still hooked to a dead instance.

(In reply to Chris AtLee [:catlee] from comment #7)
> The player element looks like this:
> <embed type="application/x-shockwave-flash"
> src="https://s.ytimg.com/yts/swfbin/player-vflmTHkPE/watch_as3.swf"
> name="movie_player" id="movie_player"
> flashvars="no_get_video_log=1&amp;aid=P9hpbq2TYSQ&amp;rmktEnabled=1&amp;
> ldpj=-20&amp..." allowfullscreen="true" allowscriptaccess="always"
> bgcolor="#000000">

This implies it's just a normal windowed mode plugin, which has less focus voodoo and generally relies on the WM to handle focusing the child, but if killing plugin-container doesn't solve the problem I'm not sure what is going wrong.
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.