hide before and append selector line when dragging

This commit is contained in:
Jos de Jong 2020-07-22 09:49:54 +02:00
parent 174f1194ef
commit ce8cf93170
2 changed files with 12 additions and 3 deletions

View File

@ -52,6 +52,16 @@
}
}
// selector must not be visible whilst dragging (mouse down)
&:active {
.before-node-selector,
.append-node-selector {
.selector {
border: none;
}
}
}
.before-node-selector {
top: -$selector-height/2 - 1px;
}

View File

@ -254,7 +254,8 @@
}
event.stopPropagation()
event.preventDefault()
// IMPORTANT: do not use event.preventDefault() here,
// else the :active style doesn't work!
// we attache the mouse up event listener to the global document,
// so we will not miss if the mouse up is happening outside of the editor
@ -287,7 +288,6 @@
function handleMouseUp (event) {
if (singleton.mousedown) {
event.preventDefault()
event.stopPropagation()
singleton.mousedown = false
@ -297,7 +297,6 @@
}
function handleSelectBefore (event) {
event.preventDefault()
event.stopPropagation()
onSelect({