mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-01 17:17:04 +08:00
Fix closing item sidebar for printing label modal [SCI-9541] (#6486)
This commit is contained in:
parent
8b5f610c07
commit
aed5418366
1 changed files with 5 additions and 5 deletions
|
|
@ -295,11 +295,11 @@ export default {
|
||||||
if (!this.isShowing) return
|
if (!this.isShowing) return
|
||||||
|
|
||||||
const sidebar = this.$refs.wrapper;
|
const sidebar = this.$refs.wrapper;
|
||||||
// Check if the clicked element is not within the sidebar and it's not another item link or belogs to modal
|
// Check if the clicked element is not within the sidebar and it's not another item link or belogs to modals
|
||||||
if (!sidebar.contains(event.target) &&
|
const selectors = ['a', '.modal', '.label-printing-progress-modal'];
|
||||||
!event.target.closest('a') &&
|
|
||||||
!event.target.closest('.modal')) {
|
if (!sidebar.contains(event.target) && !selectors.some(selector => event.target.closest(selector))) {
|
||||||
this.toggleShowHideSidebar(null)
|
this.toggleShowHideSidebar(null);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toggleShowHideSidebar(repositoryRowUrl, myModuleId = null) {
|
toggleShowHideSidebar(repositoryRowUrl, myModuleId = null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue