mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 03:14:40 +03:00
UBERF-8265 Handle undefined editor in TextEDitorToolbar (#6718)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
6fd8018baf
commit
33c7615201
@ -99,7 +99,7 @@
|
||||
|
||||
function handleMouseDown (): void {
|
||||
function handleMouseMove (): void {
|
||||
if (!editor.state.selection.empty) {
|
||||
if (editor !== undefined && !editor.state.selection.empty) {
|
||||
selecting = true
|
||||
document.removeEventListener('mousemove', handleMouseMove)
|
||||
}
|
||||
@ -112,8 +112,10 @@
|
||||
document.removeEventListener('mouseup', handleMouseUp)
|
||||
}
|
||||
|
||||
document.addEventListener('mousemove', handleMouseMove)
|
||||
document.addEventListener('mouseup', handleMouseUp)
|
||||
if (editor !== undefined) {
|
||||
document.addEventListener('mousemove', handleMouseMove)
|
||||
document.addEventListener('mouseup', handleMouseUp)
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user