Use capture phase for mouseup handler

This ensures that we always handle the mouseup even if the mouse is
outside of the editor when the button is released
This commit is contained in:
Nathan Sobo
2017-08-16 16:28:18 -06:00
parent 72322985d9
commit 3926dac789

View File

@@ -1887,7 +1887,7 @@ class TextEditorComponent {
}
window.addEventListener('mousemove', didMouseMove)
window.addEventListener('mouseup', didMouseUp)
window.addEventListener('mouseup', didMouseUp, {capture: true})
}
autoscrollOnMouseDrag ({clientX, clientY}, verticalOnly = false) {