mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-09 14:46:47 +08:00
Fix closing items sidebar on opened modals [SCI-9541] (#6455)
This commit is contained in:
parent
550aa9df48
commit
cede97d7d9
1 changed files with 4 additions and 2 deletions
|
@ -298,8 +298,10 @@ export default {
|
|||
if (!this.isShowing) return
|
||||
|
||||
const sidebar = this.$refs.wrapper;
|
||||
// Check if the clicked element is not within the sidebar and it's not another item link
|
||||
if (!sidebar.contains(event.target) && !event.target.closest('a')) {
|
||||
// Check if the clicked element is not within the sidebar and it's not another item link or belogs to modal
|
||||
if (!sidebar.contains(event.target) &&
|
||||
!event.target.closest('a') &&
|
||||
!event.target.closest('.modal')) {
|
||||
this.toggleShowHideSidebar(null)
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue