X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/b37e84dc101e8ca5c80bcd731adb9cc19b9e08ab..refs/pull/5625/head:/resources/js/components/popup.js diff --git a/resources/js/components/popup.js b/resources/js/components/popup.js index 4c20876f8..6bd8f9c72 100644 --- a/resources/js/components/popup.js +++ b/resources/js/components/popup.js @@ -1,6 +1,6 @@ -import {fadeIn, fadeOut} from "../services/animations"; -import {onSelect} from "../services/dom"; -import {Component} from "./component"; +import {fadeIn, fadeOut} from '../services/animations.ts'; +import {onSelect} from '../services/dom.ts'; +import {Component} from './component'; /** * Popup window that will contain other content. @@ -26,11 +26,11 @@ export class Popup extends Component { this.container.addEventListener('click', event => { if (event.target === this.container && lastMouseDownTarget === this.container) { - return this.hide(); + this.hide(); } }); - onSelect(this.hideButtons, e => this.hide()); + onSelect(this.hideButtons, () => this.hide()); } hide(onComplete = null) { @@ -47,7 +47,7 @@ export class Popup extends Component { show(onComplete = null, onHide = null) { fadeIn(this.container, 120, onComplete); - this.onkeyup = (event) => { + this.onkeyup = event => { if (event.key === 'Escape') { this.hide(); } @@ -56,4 +56,4 @@ export class Popup extends Component { this.onHide = onHide; } -} \ No newline at end of file +}