lightbox: On .player-container direct click, hide lightbox.

When a user clicks on the `.player-container` node and the click
target is actually that (and not the YT video iFrame within), then
hide the lightbox – they likely mean to exit out of the lightbox.
This commit is contained in:
Brock Whittaker
2017-08-01 09:21:55 -07:00
committed by Tim Abbott
parent 7caf8edadc
commit 14254f9668

View File

@@ -235,6 +235,12 @@ $(function () {
$("#lightbox_overlay .lightbox-canvas-trigger").click();
e.preventDefault();
});
$("#lightbox_overlay .player-container").on("click", function () {
if ($(this).is(".player-container")) {
overlays.close_active();
}
});
});
return exports;