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:
@@ -79,6 +79,14 @@ export class TableClipboardController implements ReactiveController {
|
|||||||
const event = _context.get('clipboardState').raw;
|
const event = _context.get('clipboardState').raw;
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
|
const active = document.activeElement as HTMLElement | null;
|
||||||
|
if (
|
||||||
|
active &&
|
||||||
|
(active.tagName === 'INPUT' || active.tagName === 'TEXTAREA')
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
const clipboardData = event.clipboardData;
|
const clipboardData = event.clipboardData;
|
||||||
if (!clipboardData) return;
|
if (!clipboardData) return;
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,14 @@ export class TableClipboardController implements ReactiveController {
|
|||||||
const event = _context.get('clipboardState').raw;
|
const event = _context.get('clipboardState').raw;
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
|
const active = document.activeElement as HTMLElement | null;
|
||||||
|
if (
|
||||||
|
active &&
|
||||||
|
(active.tagName === 'INPUT' || active.tagName === 'TEXTAREA')
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
const clipboardData = event.clipboardData;
|
const clipboardData = event.clipboardData;
|
||||||
if (!clipboardData) return;
|
if (!clipboardData) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user