Permalink
Browse files

fix: Don't enable player controls if they where disabled when ModalDi…

…alog closes. (#4690)
  • Loading branch information...
nicolaslevy authored and gkatsev committed Oct 30, 2017
1 parent 43ddc72 commit afea98017403bcf132711c55661b3f1e7873f259
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/js/modal-dialog.js
View
@@ -187,7 +187,10 @@ class ModalDialog extends Component {
this.on(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress));
}
// Hide controls and note if they were enabled.
this.hadControls_ = player.controls();
player.controls(false);
this.show();
this.conditionalFocus_();
this.el().setAttribute('aria-hidden', 'false');
@@ -249,7 +252,10 @@ class ModalDialog extends Component {
this.off(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress));
}
player.controls(true);
if (this.hadControls_) {
player.controls(true);
}
this.hide();
this.el().setAttribute('aria-hidden', 'true');

0 comments on commit afea980

Please sign in to comment.