fix(editor): pasting into database multiselect input auto adds a new tag (#12693)

Co-authored-by: 3720 <zuozijian1994@gmail.com>
This commit is contained in:
Aadi
2025-06-09 07:07:54 +05:30
committed by GitHub
parent 115496aa8e
commit f69a98eb8c
2 changed files with 16 additions and 0 deletions

View File

@@ -79,6 +79,14 @@ export class TableClipboardController implements ReactiveController {
const event = _context.get('clipboardState').raw;
event.stopPropagation();
const active = document.activeElement as HTMLElement | null;
if (
active &&
(active.tagName === 'INPUT' || active.tagName === 'TEXTAREA')
) {
return true;
}
const clipboardData = event.clipboardData;
if (!clipboardData) return;

View File

@@ -78,6 +78,14 @@ export class TableClipboardController implements ReactiveController {
const event = _context.get('clipboardState').raw;
event.stopPropagation();
const active = document.activeElement as HTMLElement | null;
if (
active &&
(active.tagName === 'INPUT' || active.tagName === 'TEXTAREA')
) {
return true;
}
const clipboardData = event.clipboardData;
if (!clipboardData) return;