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`
This commit is contained in:
Amo Wu 2016-11-24 11:21:43 +08:00 committed by GitHub
parent 4ca3f030cc
commit a7969b8e9e

View File

@ -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);
}