From 38aa7fed0c9b8bee139fc8d61d3ae6c2ce23ce19 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 5 Sep 2015 23:26:59 -0700 Subject: [PATCH] Work around Firefox 42 controls bug. #450 --- src/Images/ImageCommon.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Images/ImageCommon.coffee b/src/Images/ImageCommon.coffee index a5adc925a..fc7b55767 100644 --- a/src/Images/ImageCommon.coffee +++ b/src/Images/ImageCommon.coffee @@ -79,6 +79,15 @@ ImageCommon = # Add controls, but not until the mouse is moved over the video. addControls: (video) -> + # XXX https://bugzilla.mozilla.org/show_bug.cgi?id=1192302 + if /Gecko\/20100101\ \w+\/42\./.test navigator.userAgent + video.controls = true + if doc.contains video + {parentNode, nextSibling, paused} = video + $.rm video + parentNode.insertBefore video, nextSibling + video.play() unless paused + return handler = -> $.off video, 'mouseover', handler # Hacky workaround for Firefox forever-loading bug for very short videos