From a7969b8e9e2201054ea55d3c62d6c0c165f6eb9d Mon Sep 17 00:00:00 2001 From: Amo Wu Date: Thu, 24 Nov 2016 11:21:43 +0800 Subject: [PATCH] Fix cannot scroll after destroyed In single page application, switch router when plyr is fullscreen mode, page cannot scroll, because `document.body.style.overflow` is `hidden` --- src/js/plyr.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/plyr.js b/src/js/plyr.js index ec3f4029..ddc20630 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -3664,6 +3664,9 @@ // Replace the container with the original element provided plyr.container.parentNode.replaceChild(original, plyr.container); + // unbind escape key + document.body.style.overflow = ''; + // Event _triggerEvent(original, 'destroyed', true); }