Update components/chat-message-display.tsx

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Dayuan Jiang
2025-11-29 13:03:46 +09:00
committed by GitHub
parent 1b7414d7a1
commit 73b1f6e8be

View File

@@ -45,7 +45,8 @@ export function ChatMessageDisplay({
textArea.value = text;
// 设置样式避免影响页面布局
textArea.style.position = "fixed";
textArea.style.left = "-9999px";
// 降级方案:使用传统的 execCommand 方法(兼容 HTTP 环境)
// Fallback: Use textarea selection (works in most browsers)
textArea.style.top = "-9999px";
textArea.style.opacity = "0";
document.body.appendChild(textArea);