fix tab events

pull/3069/head
REJack 2020-09-29 08:48:41 +02:00
parent 39f9e9e8a8
commit f0f59489f0
1 changed files with 5 additions and 7 deletions

View File

@ -190,23 +190,21 @@ class IFrame {
})
$(document).on('click', SELECTOR_SIDEBAR_MENU_ITEM, e => {
e.preventDefault()
this.onTabClick(e.target)
this.openTabSidebar(e.target)
})
if (this._config.useNavbarItems) {
$(document).on('click', `${SELECTOR_HEADER_MENU_ITEM}, ${SELECTOR_HEADER_DROPDOWN_ITEM}`, e => {
e.preventDefault()
this.onTabClick(e.target)
this.openTabSidebar(e.target)
})
$(document).on('click', SELECTOR_TAB_NAVBAR_NAV_ITEM, e => {
e.preventDefault()
this.onTabClick(e.target)
this.switchTab(e.target)
})
}
$(document).on('click', SELECTOR_TAB_NAVBAR_NAV_ITEM, e => {
e.preventDefault()
this.onTabClick(e.target)
this.switchTab(e.target)
})
$(document).on('click', SELECTOR_DATA_TOGGLE_CLOSE, e => {
e.preventDefault()
this.removeActiveTab()