mirror of https://github.com/nextcloud/bookmarks
[UI] drop-target directive: Correctly remove --available class
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
5b4c46f521
commit
d13e29c685
|
@ -43,6 +43,12 @@ export default {
|
||||||
el.classList.remove('dropTarget--available')
|
el.classList.remove('dropTarget--available')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
window.document.body.addEventListener('dragend', (e) => {
|
||||||
|
const targets = document.querySelectorAll('.dropTarget--available')
|
||||||
|
targets.forEach(el => {
|
||||||
|
el.classList.remove('dropTarget--available')
|
||||||
|
})
|
||||||
|
})
|
||||||
window.document.body.addEventListener('dragstart', (e) => {
|
window.document.body.addEventListener('dragstart', (e) => {
|
||||||
if (allowDrop(e)) {
|
if (allowDrop(e)) {
|
||||||
el.classList.add('dropTarget--available')
|
el.classList.add('dropTarget--available')
|
||||||
|
|
Loading…
Reference in New Issue