1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/bower_components/emby-webcomponents/fullscreen/fullscreen-dc.js

12 lines
454 B
JavaScript
Raw Normal View History

2018-10-23 01:05:09 +03:00
define(["dom", "fullscreenManager"], function(dom, fullscreenManager) {
"use strict";
function isTargetValid(target) {
return !dom.parentWithTag(target, ["BUTTON", "INPUT", "TEXTAREA"])
}
dom.addEventListener(window, "dblclick", function(e) {
isTargetValid(e.target) && (fullscreenManager.isFullScreen() ? fullscreenManager.exitFullscreen() : fullscreenManager.requestFullscreen())
}, {
passive: !0
})
});