|
|
@@ -356,8 +356,18 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ function isTextEntryTarget(target: EventTarget | null): boolean {
|
|
|
+ if (target instanceof HTMLTextAreaElement || target instanceof HTMLSelectElement) return true
|
|
|
+ if (target instanceof HTMLInputElement) {
|
|
|
+ const type = (target.getAttribute('type') || 'text').toLowerCase()
|
|
|
+ return type !== 'checkbox' && type !== 'radio'
|
|
|
+ }
|
|
|
+ return target instanceof HTMLElement && target.isContentEditable
|
|
|
+ }
|
|
|
+
|
|
|
function onKeydown(event: KeyboardEvent) {
|
|
|
if (!excelMode.value || !props.excelCopy) return
|
|
|
+ if (isTextEntryTarget(event.target)) return
|
|
|
const root = tableRoot()
|
|
|
const panel = root?.closest('.panel')
|
|
|
const target = event.target as Node | null
|