prevent click event on selected element
danielravina opened this issue · 2 comments
danielravina commented
Hi there,
Thank you for making this cool project.
is it possible to somehow disable the click event when an element is selected?
Thanks
luoye-fe commented
Maybe you can directly disable the click event when enable dom inspect.
.inspect-content * {
/* disable all mouse events on subElements */
pointer-events: none;
}
OR
let enableInspector = false; // just modify that variable to disable all clics events
document.addEventListener("click", freezeClicFn, true);
function freezeClicFn(e) {
if (freezeClic) {
e.stopPropagation();
e.preventDefault();
}
}
danielravina commented
@luoye-fe I used the JS. it didn't work so I added extra listeners on mousedown
and now it's working perfectly. Thanks!