]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/page-picker.js
Oidc: Properly query the UserInfo Endpoint
[bookstack] / resources / js / components / page-picker.js
index 130972fdd63ebc8aaed1cf4572a728d25a505904..9bb0bee04a3fb6be13e798d01352e0b59b6fa2bf 100644 (file)
@@ -1,7 +1,7 @@
 import {Component} from './component';
 
 function toggleElem(elem, show) {
-    elem.style.display = show ? null : 'none';
+    elem.toggleAttribute('hidden', !show);
 }
 
 export class PagePicker extends Component {
@@ -21,6 +21,7 @@ export class PagePicker extends Component {
     setupListeners() {
         this.selectButton.addEventListener('click', this.showPopup.bind(this));
         this.display.parentElement.addEventListener('click', this.showPopup.bind(this));
+        this.display.addEventListener('click', e => e.stopPropagation());
 
         this.resetButton.addEventListener('click', () => {
             this.setValue('', '');