Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to copy text from a page​ #6463

Open
1 task
JonathanHarford opened this issue Apr 5, 2024 · 8 comments
Open
1 task

Unable to copy text from a page​ #6463

JonathanHarford opened this issue Apr 5, 2024 · 8 comments

Comments

@JonathanHarford
Copy link

JonathanHarford commented Apr 5, 2024

What happened?

When I select text from a page, I cannot copy it to my clipboard. I've tried:

  • Cmd+C
  • RIght-click: Copy
  • Clicking the "copy" button on the popup

Every time I try to paste, instead it pastes what I had previously copied (i.e. not something from my Affine)

Distribution version

Web (app.affine.pro)

What browsers are you seeing the problem on if you're using web version?

Chrome, Firefox

Are you self-hosting?

  • Yes

Relevant log output

TypeError: Cannot read properties of undefined (reading 'write')
    at l.writeToClipboard (index.ts:210:31)
    at async l.copySlice (index.ts:240:5)

Anything else?

AFFiNE 0.13.4
AFFiNE Editor Version
0.14.0-canary-202403250855-4171ecd
Hosted on a machine on my local network, not app.affine.pro.

@affine-issue-bot
Copy link

Issue Status: 🆕 *Untriaged

*🆕 Untriaged

The team has not yet reviewed the issue. We usually do it within one business day.
Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md

This is an automatic reply by the bot.

@EYHN
Copy link
Member

EYHN commented Apr 6, 2024

It is a known issue that firefox cannot copy. Please confirm again whether chrome can copy.

@JonathanHarford
Copy link
Author

Correct, unable to copy with Chrome.

Screen.Recording.2024-04-06.at.1.00.42.PM.mov

@pengx17
Copy link
Collaborator

pengx17 commented Apr 8, 2024

Should be duplicate of #5944
You may need to serve the web page with https for self-hosting

@javix64
Copy link

javix64 commented Apr 12, 2024

Should be duplicate of #5944 You may need to serve the web page with https for self-hosting

Hey @pengx17, can you explain how to serve with https for self-hosting?

I explain myself: As far I know, you need to create a certificate (at last with let's encrypt) for deploying it with certificate, but in any place of AFFINE say or explain how to achive this.

I have searched in reddit, in the official documentation and in github, but anyway, does not appear how to do it.

I am using the docker version, but will be easier and fantastic if someone implement this feature for the future.

I think that is a must that any APP can copy & paste anything.

Thanks, I am waiting for your answer.

@medoix
Copy link

medoix commented May 1, 2024

I am proxying Affine behind Cloudflare using HTTPS and Copy+Paste using either the keyboard shortcuts or even mouse right click does not work still in Firefox BUT it DOES work in Chrome it seems.

I am running Affine in Docker Self Host using the Beta tag.

In Firefox i get the following

ReferenceError: ClipboardItem is not defined
    writeToClipboard index.ts:214
    copySlice index.ts:244
    copy index.ts:135
    E copy-selected-models.ts:41
    49962/d/this.chain/e[i]/< manager.ts:147
    e manager.ts:159
    e manager.ts:160
    L get-selected-models.ts:61
    49962/d/this.chain/e[i]/< manager.ts:147
    e manager.ts:159
    e manager.ts:160
    with manager.ts:47
    e manager.ts:159
    run manager.ts:30
    onPageCut index.ts:128
    run dispatcher.ts:143
    _cut clipboard.ts:30
    c rocket-loader.min.js:1
    ```

@KranzAklilu
Copy link

this happens also for the cloud version. (also using firefox and not getting this using chrome)

@oiqm4T
Copy link

oiqm4T commented Jun 18, 2024

any update to this issue? not able copy and paste out of Affine self hosted. -- Solved for me

It seems using HTTPS fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 *Untriaged
Development

No branches or pull requests

7 participants