Comments (6)
我在 chrome 123 浏览器中测试复制按钮是可以正常工作的
可以提供一些更多的信息以更好的解决这个问题吗?
from chatgpt-web.
我在 chrome 123 浏览器中测试复制按钮是可以正常工作的 可以提供一些更多的信息以更好的解决这个问题吗?
我的是macbook pro m1
mac下都提示复制失败!
Parallels Desktop 虚拟机win11,同样也是提示复制失败!
这个js对象 navigator.clipboard 是 undefined
上面各个版本测试了,确实不行。可以让有macbook的同事帮忙测试下
from chatgpt-web.
原来的代码这样改就可以了吧?可能是监听事件的问题!
export function copyToClip(text: string) {
return new Promise((resolve, reject) => {
try {
const input: HTMLTextAreaElement = document.createElement('textarea')
input.setAttribute('readonly', 'readonly')
input.value = text?.replace(/\n+$/, '\n')
document.body.appendChild(input)
input.select()
if (document.execCommand('copy'))
document.execCommand('copy')
document.body.removeChild(input)
resolve(text)
}
catch (error) {
reject(error)
}
})
}
from chatgpt-web.
from chatgpt-web.
应该是 你使用的 http 访问一个非localhost地址 导致的 navigator.clipboard api无法使用?
方便的话帮忙测试一下PR中的更改是否解决了这个问题?
ping @huangzt
from chatgpt-web.
测试可以
@BobDu
from chatgpt-web.
Related Issues (20)
- 邮箱验证、修改密码报错后,后台服务程序直接退出 HOT 1
- SMTP设置部分能增加一个发件人地址字段吗
- 建议增加STT、TTS、OCR功能
- 程序回答代码高亮问题 HOT 5
- 怎么修改api地址和添加模型呢 HOT 2
- 新用户全局次数设置,是否可以实现每日重置呢? HOT 1
- 程序内容回答过多的时候需要手动下拉才能到最底下
- 怎么在vercel上部署? HOT 1
- 冒昧问下更新后设置key的地方在哪里? HOT 2
- 【错误】连续对话错误
- 对话失败|怎么设置代理地址? HOT 1
- 随着4o模型的出现,是否能支持多模态的内容输入和输出 HOT 1
- FR: 用户输入增加渲染markdown语法支持 HOT 3
- vision模型图片上传没压缩? HOT 8
- GPT4怎么突然记不住上一段内容? HOT 2
- 4o模型没有图片输入吗 HOT 4
- 建议增加一个默认模型配置项,当前默认gpt-turbo可以一键配置为其它如gpt4-xxx
- 建议增加一个全局搜索的功能
- 设置标志不见了 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatgpt-web.