From 782b062baa4bf070c42aea354e9f375512e5105c Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 31 Oct 2016 12:38:47 -0400 Subject: [PATCH] FIX: Selecting text was weird with the latest Chrome hack --- plugins/lazyYT/assets/javascripts/initializers/lazyYT.js.es6 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/lazyYT/assets/javascripts/initializers/lazyYT.js.es6 b/plugins/lazyYT/assets/javascripts/initializers/lazyYT.js.es6 index 29d5c10060f..b05cf205393 100644 --- a/plugins/lazyYT/assets/javascripts/initializers/lazyYT.js.es6 +++ b/plugins/lazyYT/assets/javascripts/initializers/lazyYT.js.es6 @@ -8,6 +8,9 @@ export default { withPluginApi('0.1', api => { api.decorateCooked($elem => { + const iframes = $('.lazyYT', $elem); + if (iframes.length === 0) { return; } + // We use this because watching videos fullscreen in Chrome was super buggy // otherwise. Thanks to arrendek from q23 for the technique. $elem.iframeTracker({ blurCallback: () => {