|
|
@@ -70,7 +70,7 @@ function init() {
|
|
|
useKeyboard((evt) => {
|
|
|
if (store.stack.length === 0) return
|
|
|
if (evt.defaultPrevented) return
|
|
|
- if ((evt.name === "escape" || (evt.ctrl && evt.name === "c")) && renderer.getSelection()) return
|
|
|
+ if ((evt.name === "escape" || (evt.ctrl && evt.name === "c")) && renderer.getSelection()?.getSelectedText()) return
|
|
|
if (evt.name === "escape" || (evt.ctrl && evt.name === "c")) {
|
|
|
const current = store.stack.at(-1)!
|
|
|
current.onClose?.()
|