[10.5] Viewing full-screen Flash screws up Command-W shortcut so that all tabs close

RESOLVED FIXED in Camino2.0

Status

Camino Graveyard
Plug-ins
--
major
RESOLVED FIXED
10 years ago
8 years ago

People

(Reporter: Chris Lawson (gone), Assigned: Stuart Morgan)

Tracking

({dataloss, fixed1.8.1.24})

unspecified
Camino2.0
All
Mac OS X
dataloss, fixed1.8.1.24

Details

(Whiteboard: [camino-2.0], URL)

Attachments

(1 attachment)

fix
3.00 KB, patch
Mike Pinkerton (not reading bugmail)
: superreview+
Details | Diff | Splinter Review
(Reporter)

Description

10 years ago
STR:

1) Have at least one tab open.
2) Open a new tab with any YouTube video in it, so you now have two tabs.
3) Put the YouTube video in full-screen mode.
4) Press Esc to exit full-screen mode.
5) Hit Command-W to close the YouTube tab.

ER: YouTube tab closes.

AR: Depending on pref setting, either a) whole window closes or b) you get warned that the whole window is about to close.

Pressing Esc in the warning dialog (if your prefs are set to warn) returns the Command-W shortcut to its normal behaviour.

It's almost like a Shift key event got inserted in there somewhere.

Happens in both 1.6 and trunk with Flash 9.0r124 installed.

A similar bug (though not the same, so filing in Camino for now) happens in Minefield: Cmd-W totally fails to work after executing the STR, and the YouTube tab must be closed with the mouse. It's possible the root cause for both is the same and this should be Widget:Cocoa or Core:Plugins, but I'll let someone smarter than I make that call.

Comment 1

10 years ago
In both Camino (trunk) and Minefield, after pressing Esc to exit full screen mode, the page has no focus anymore. Page down with space-bar fails, I had to click twice to pause the movie (one click to get the focus on the page, one click to pause the movie).

After clicking in the page to regain focus, a Cmd-W closes the window correctly in both browsers.
If you look at the File menu, you'll see "Close Tab" is disabled.  (Possibly this was the cause of bug 336634, too.)

Interestingly, nothing has focus (if you look at the close/minimize/zoom globes or are on a page with a scroll thumb, like http://www.bunnyhero.org/2008/05/10/scaring-people-with-fullscreen/ , you'll see that the window mostly doesn't think it has focus, since they're all grey, although the toolbar is still dark/active on 10.5).  Given that confusion, we really shouldn't be allowing Cmd-W, or any other command, to work at all.

See also bug 337963 comment 6 and bug 336634 comment 12/13.
Summary: Viewing full-screen videos in YouTube screws up Command-W shortcut so that all tabs close → Viewing full-screen Flash screws up Command-W shortcut so that all tabs close
Sam remembered that I couldn't repro when this bug was filed, and here's why:

On 10.3, Esc doesn't work in full-screen mode, unless you "click" in the full-screen after it launches.  Afterwards, the tab is not focused (I can't spacebar to pg down), but none of the window looks disabled, Close Tab isn't disabled, and Cmd-W just closes the tab.
Can anyone repro this on 10.4.11?  In bug 452843, Steven posits that this (the underlying focus issue) is an OS bug.

Comment 5

9 years ago
I can't reproduce this in both 1.6.4pre and 2.0a1pre with Flash 9.0r124 installed on OS X 10.4.11.
And bug 452843 happens only in 2.0a1pre not in 1.6.4pre.
Summary: Viewing full-screen Flash screws up Command-W shortcut so that all tabs close → [10.5] Viewing full-screen Flash screws up Command-W shortcut so that all tabs close

Comment 6

9 years ago
Is this ever gonna get fixed?  It has been a YEAR since first reported.  This bug is easily reproduced on OS 10.5x using the last 2 or 3 versions of camino and any full-screen flash video.

It just happened to me today: OS 10.6 PowerPC, camino 1.6.7.

Comment 7

9 years ago
(In reply to comment #6)
> Is this ever gonna get fixed?  It has been a YEAR since first reported.

If you can help us figure out how to fix it, by all means pitch in.

> This
> bug is easily reproduced on OS 10.5x using the last 2 or 3 versions of camino
> and any full-screen flash video.

Can you come up with some simple Steps To Reproduce?  If so, please post them here.


FWIW, I have seen this fairly regularly in Safari as well, so I'm tempted to agree with Steven that this is not Camino's bug.

Comment 8

9 years ago
OK,

I can reproduce this in Camino AND Safari (steps below) but not Firefox, sooo I'm not sure what that means.  Are you guys off the hook?  

Also, the previous comments regarding menu availability and window focus are confirmed (Comment #2).  To whit:

After Esc is press to end full-screen mode, the main window does not have focus but the menubar is active, the "Close Tab" menu item is disabled, and Command-W is mapped to "Close Window."

Clicking on the window restores focus, enables the "Close Tab" menu item and maps Command-W to it, and maps Shift-Command-W to "Close Window."

This behavior is essentially the same in both Camino and Safari, the one exception being that in Safari the "Close Tab" menu is not disabled after returning from full-screen although it does lose the Command-W mapping like Camino.  If used the menu item will properly close the currently selected tab.  

It seems that perhaps app-switching or window cycling behavior is the real culprit.  Returning from full-screen mode (Flash) does not properly return focus to the window (Camino/Safari) that holds the tab that contains the video that requested full-screen mode in the first place.  If the window had focus this would be a non-issue.

I've seen other examples where switching between apps results in a foreground app with no focused windows even though the app only has ONE.  Something like that could be the case here.  After Flash give up total control Camino returns to the foreground with no focused window.

If camino knew that full-screen mode had been requested via the flash player in one of its tabs, and also knew when full-screen mode was terminated, window focus could probably be forced, which would resolve this issue.  With no knowledge of camino internals (or how OS X does full-screen, app-backgrounding, etc) that's all just a guess, but it might be one approach.

Or more simply, force Camino to always have a focused window IF it is the foreground app.  Just use the window at the top of the window stack and that should get the correct internal tab (if any) focused also.

Just my $0.02

-------------------------------
Step to reproduce (OS 10.6 PPC)

Launch camino or safari, and load default homepage
Press Command-T 4 times (open 4 new tabs)
Copy/paste this URL into the last tab: http://www.youtube.com/watch?v=Yu_moia-oVI
Press Return
Expand video to full screen
Enjoy for a few moments ;-)
Press Esc
<now is a good time to check out the state of the menus and shortcuts>
Press Command-W
Depending on Prefs either confirm the close and see all tabs close, or just watch them go away immediately.
(Reporter)

Updated

8 years ago
Duplicate of this bug: 517743

Comment 10

8 years ago
Looking back at my browsing history it appears that my incident with this bug was probably triggered by a full-screen session with slideshare. Here's the URL: http://www.slideshare.net/iaald/the-future-is-mobile-icts-empowering-local-communities-in-developing-countries ... open a new window, add just one additional tab, go full screen, escape back, hit cmd-W and you lose the whole window.

A request: change the "Warn me when" preference to JUST warn on quitting; and warn when closing a window with multiple tabs always show a warning until this bug is fixed. I lost about an hours work in an online text editor because of the bug...

If it's showing up in Safari then it's almost certainly a window focus problem caused by the flash plug-in.... presumably this comes from Adobe and they could fix it and probably Apple is aware of & trying to get them to, but in the mean time... Does camino receive any notification when the plugin goes to full screen or when it comes back from full screen? How does the plug-in get to display outside of the normal window? There must be a new window or some kind of view being created and then destroyed ... could you get notifications or delegate messages from that?

Comment 11

8 years ago
FWIW, I can no longer repro this in 10.6.

10.6.1, Flash Player 10,0,32,18, Camino 2.0b4, Camino 1.6.9, and Safari.
(Assignee)

Comment 12

8 years ago
Created attachment 401713 [details] [diff] [review]
fix

Comment 2 is the window being main but not key; this is normal when there's a floating panel (e.g., bookmark info), but what's odd here is that there is no key window at all, and apparently key events get delivered to the main window in that case.

We can detect that, and do our normal menu item juggling in that case as we do if we are key. I tested with just a browser window (browser main and key), the download window on top (non-browser main and key), the bookmark info panel open (browser main, non-browser key), and the Flash bug (browser main, nothing key), and all work as expected now.
Assignee: nobody → stuart.morgan+bugzilla
Status: NEW → ASSIGNED
Attachment #401713 - Flags: superreview?(mikepinkerton)
(Assignee)

Comment 13

8 years ago
This is simple and self-contained, so I think we should take it for 1.6.10.
Flags: camino1.6.10?
Target Milestone: --- → Camino2.0
Comment on attachment 401713 [details] [diff] [review]
fix

sr=pink
Attachment #401713 - Flags: superreview?(mikepinkerton) → superreview+
(Assignee)

Comment 15

8 years ago
Landed on CVS trunk and CAMINO_2_0_BRANCH. Smokey, it's your call whether you want to take this for 1.6.10.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Yes, please land this for 1.6.10.  I had planned on testing it on 10.3.9, too, and making sure there were no unintended consequences, but other things got in the way and I won't be able to do that for a while; however, the code is straightforward enough even that I can understand what it does by looking at it, so let's take it.
Flags: camino1.6.10? → camino1.6.10+
(Assignee)

Comment 17

8 years ago
Landed on MOZILLA_1_8_BRANCH.
Keywords: fixed1.8.1.24
Whiteboard: [camino-2.0]

Comment 18

8 years ago
fixed for me :-)
You need to log in before you can comment on or make changes to this bug.