Event rollback
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2021-10-18 14:23:37 +02:00
parent 81bcc9202d
commit f87c8989e4
1 changed files with 2 additions and 7 deletions

View File

@ -12,7 +12,6 @@ export default class SideMenu extends Component {
constructor($element, $) {
super($element, $);
this.side = 'left';
this.mobileWidth = 800;
}
$onInit() {
@ -61,12 +60,8 @@ export default class SideMenu extends Component {
show() {
if (this.shown) return;
this.shown = true;
if (this.$window.innerWidth <= this.mobileWidth) {
this.handler = e => this.onEscape(e);
this.$window.addEventListener('keydown', this.handler);
}
this.handler = e => this.onEscape(e);
this.$window.addEventListener('keydown', this.handler);
this.stateHandler = this.$transitions.onStart({}, t => this.onTransition(t));
this.layout.element.classList.add('shown');
}