Skip to content

Update ImportDataMode.tsx——fix bug of “copy prompt”#2

Open
maoguy wants to merge 1 commit into
curionox:mainfrom
maoguy:main
Open

Update ImportDataMode.tsx——fix bug of “copy prompt”#2
maoguy wants to merge 1 commit into
curionox:mainfrom
maoguy:main

Conversation

@maoguy
Copy link
Copy Markdown

@maoguy maoguy commented Dec 24, 2025

fix bug of copyFullPrompt.

现象:通过http+ip访问时,复制提示词失败

311c46fec667a23913e5afa2cfeb953f

原因:通过http+ip访问时,navigator.clipboard API被禁止使用

navigator.clipboard.writeText的浏览器兼容性总体良好,但在部分浏览器和场景下存在限制。主要兼容情况汇总如下:

浏览器/平台 支持情况 关键限制与说明 支持起始版本 (约)
Chrome / Edge ✅ 支持 需安全上下文 (HTTPS 或 localhost) Chrome 66+
Firefox ✅ 支持 1. 需安全上下文2. 处理富文本时可能存在异步兼容问题 Firefox 63+
Safari (macOS) ✅ 支持 需安全上下文 Safari 13.1+
iOS Safari ✅ 支持 交互限制:必须由用户手势(如点击)直接触发 iOS 13.4+
Internet Explorer ❌ 不支持 完全不支持 navigator.clipboard API

解决方案:加入兜底策略(如本次提交)

fix bug of copyFullPrompt
@maoguy maoguy changed the title Update ImportDataMode.tsx Update ImportDataMode.tsx——fix bug of “copy prompt” Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant