mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Fix a bug on click
This commit is contained in:
@@ -24,8 +24,9 @@ document.addEventListener('dragover', function (e) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
document.addEventListener('click', function (e) {
|
document.addEventListener('click', function (e) {
|
||||||
if (!e.target.className) return
|
const className = e.target.className
|
||||||
const isInfoButton = e.target.className.includes('infoButton')
|
if (!className && typeof(className) !== 'string') return
|
||||||
|
const isInfoButton = className.includes('infoButton')
|
||||||
const isInfoPanel = e.target.offsetParent.className.includes('infoPanel')
|
const isInfoPanel = e.target.offsetParent.className.includes('infoPanel')
|
||||||
if (isInfoButton || isInfoPanel) return
|
if (isInfoButton || isInfoPanel) return
|
||||||
const infoPanel = document.querySelector('.infoPanel')
|
const infoPanel = document.querySelector('.infoPanel')
|
||||||
|
|||||||
Reference in New Issue
Block a user