feat: pause plyr on hashchange
This commit is contained in:
parent
f871cd5ac5
commit
01843f75ef
1 changed files with 7 additions and 2 deletions
|
|
@ -110,10 +110,15 @@ export default class OnboardingWidget extends Widget {
|
|||
$(`<button class="btn btn-primary btn-sm">${__(step.action)}</button>`)
|
||||
.appendTo(this.step_footer)
|
||||
.on('click', () => {
|
||||
plyr.pause()
|
||||
actions[step.action](step)
|
||||
plyr.pause();
|
||||
actions[step.action](step);
|
||||
});
|
||||
|
||||
// Fire only once, on hashchange
|
||||
$(window).one('hashchange', () => {
|
||||
plyr.pause();
|
||||
})
|
||||
|
||||
$(`<button class="btn btn-secondary ml-2 btn-sm">${__('Back')}</button>`)
|
||||
.appendTo(this.step_footer)
|
||||
.on('click', toggle_content);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue