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

Fix copy when focused on the browser's address bar. #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lingceng
Copy link

@lingceng lingceng commented Aug 3, 2024

No description provided.

@wdhongtw wdhongtw self-assigned this Aug 9, 2024
@wdhongtw
Copy link
Owner

Hi @lingceng , thanks for the PR.

The ability to support copy when focusing on address bar looks appealing,
but the usage on deprecated interface document.execCommand discourage me from accepting this.
(Actually the first working version of this extension does use document.execCommand, in a slightly different way.)

Also, would you like to elaborate a little abount the scenario where you are copying link without page focus?
Actually I didn't notice this limitation before this PR , so I'm interested about how you use this extension normally. :D

@wdhongtw
Copy link
Owner

@lingceng
Copy link
Author

Thank you for your reply.

The specific scenario is that sometimes I accidentally click on the address bar, and clicking the copy button doesn't work.

I understand the security scenario you're referring to, and recently I've noticed that using the execCommand approach throws errors on some Lark documents where modifications aren't allowed, so it's not a perfect solution either.

Perhaps we could provide a prompt when the current text is not focused and cannot be copied?

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.

2 participants