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

Dont work at docs.google.com/spreadsheets #1

Closed
ArtJuice opened this issue Nov 8, 2022 · 4 comments · Fixed by #2
Closed

Dont work at docs.google.com/spreadsheets #1

ArtJuice opened this issue Nov 8, 2022 · 4 comments · Fixed by #2
Labels
bug Something isn't working

Comments

@ArtJuice
Copy link

ArtJuice commented Nov 8, 2022

Hi.

Your Extension buged, it did not work propertly at docs.google.com/spreadsheets - when select one or multiple cell you can't paste any text even copyed by CTRL/CMD+C to another cell on Win and Mac. Also in MacOS dont work menu by duble tap(RMC Win).

@farblos farblos added the bug Something isn't working label Nov 17, 2022
@farblos
Copy link
Owner

farblos commented Nov 17, 2022

My first issue ever - cool.

As mentioned here, this extension is extremely simple. I checked on Google docs, and there is simply no reasonable selection available on these pages that the extension could access.

But from what I understand from your bug report, the extension even breaks regular copy and paste on docs.google.com - is that correct?

Um, yes, seems that I can reproduce that on Firefox on Linux: Select one cell, Ctrl-C, select another cell, Ctrl-V, nothing happens. With extension disabled, things work fine. Will see what I can do about that.

@farblos
Copy link
Owner

farblos commented Nov 17, 2022

For spreadsheets docs.google.com provides a non-empty but completely meaningless selection in document.getSelection(). That lets the extension call document.execCommand('copy'), which (presumably) interferes with the real selection made by docs.google.com.

There do not seem to be any special properties in the selection provided by docs.google.com which distinguishes them from regular text selections, so the only way to make this work seems to be something like: "if selection made on docs.google.com, then do not process it." Bah.

Will try to implement sth along these lines.

farblos added a commit that referenced this issue Dec 1, 2022
- Fixed issue #1.

- Added a version history.
@farblos farblos linked a pull request Dec 1, 2022 that will close this issue
@farblos farblos closed this as completed in #2 Dec 1, 2022
@farblos
Copy link
Owner

farblos commented Dec 1, 2022

Processed the GitHub paperworks, will upload to AMO over the weekend.

@farblos
Copy link
Owner

farblos commented Dec 3, 2022

Done.
Just in case somebody is interested in the details: The fix for this issue is rather crude - this extension simply ignores all events on pages from docs.google.com in a hard-coded way.
Should the ever-growing user-base come accross a larger number of such sites, I probably need to extend that approach to something more scalable and configurable...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants