]>
BookStack Code Mirror - bookstack/blobdiff - resources/js/components/dropdown.js
projects
/
bookstack
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Addressed user detail harvesting issue
[bookstack]
/
resources
/
js
/
components
/
dropdown.js
diff --git
a/resources/js/components/dropdown.js
b/resources/js/components/dropdown.js
index 7b1ce30556d41bde39b961065b47f87dcc5783f4..f761ecf011541590963caf66daf4b145f43c8cde 100644
(file)
--- a/
resources/js/components/dropdown.js
+++ b/
resources/js/components/dropdown.js
@@
-12,11
+12,13
@@
class DropDown {
this.menu = this.$refs.menu;
this.toggle = this.$refs.toggle;
this.moveMenu = this.$opts.moveMenu;
this.menu = this.$refs.menu;
this.toggle = this.$refs.toggle;
this.moveMenu = this.$opts.moveMenu;
+ this.bubbleEscapes = this.$opts.bubbleEscapes === 'true';
this.direction = (document.dir === 'rtl') ? 'right' : 'left';
this.body = document.body;
this.showing = false;
this.setupListeners();
this.direction = (document.dir === 'rtl') ? 'right' : 'left';
this.body = document.body;
this.showing = false;
this.setupListeners();
+ this.hide = this.hide.bind(this);
}
show(event = null) {
}
show(event = null) {
@@
-136,7
+138,9
@@
class DropDown {
} else if (event.key === 'Escape') {
this.hide();
this.toggle.focus();
} else if (event.key === 'Escape') {
this.hide();
this.toggle.focus();
- event.stopPropagation();
+ if (!this.bubbleEscapes) {
+ event.stopPropagation();
+ }
}
};
this.container.addEventListener('keydown', keyboardNavigation);
}
};
this.container.addEventListener('keydown', keyboardNavigation);