I want to be able to select/activate items with a mousedown, but also be able to move items around by dragging them without triggering a mousedown event. Is this possible? Right now I'm forced to use "click" instead so I can drag as well.
let container = document.querySelector("#container")
container.addEventListener("mousedown", () => {
console.log("mousedown action")
})
container.addEventListener("dragstart", () => {
console.log("drag start")
})
div {
background-color: grey;
color: white;
width: 150px;
border: 1px solid green;
user-select: none;
}
<div id="container">
<div draggable=true>Item 1</div>
<div draggable=true>Item 2</div>
<div draggable=true>Item 3</div>
<div draggable=true>Item 4</div>
</div>