Bug 1246128: F11 displays the audio container in fullscreen instead of the browser. r=bz

MozReview-Commit-ID: IWKJvwDaFsG

--HG--
extra : rebase_source : 7e23ddd384b01282b6c05412764061ebbda5c49a
extra : source : baf5dfffbc347cef3d7152f5b5d7ad7408a3f69d
This commit is contained in:
Steffen Wilberg 2016-02-07 17:55:48 +01:00
Родитель f379b78525
Коммит deb846be89
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -14,9 +14,9 @@ document.addEventListener("keypress", ev => {
if (ev.synthetic) // prevent recursion
return;
// Maximize the video when pressing F11,
// because this is the standanlone video document.
if (ev.key == "F11") {
// Maximize the standalone video when pressing F11,
// but ignore audio elements
if (ev.key == "F11" && videoElement.videoWidth != 0 && videoElement.videoHeight != 0) {
// If we're in browser fullscreen mode, it means the user pressed F11
// while browser chrome or another tab had focus.
// Don't break leaving that mode, so do nothing here.