jswanner / DontF-WithPaste

Google Chrome extension that prevents the blocking of pasting into input fields
https://chrome.google.com/webstore/detail/dont-fuck-with-paste/nkgllhigpcljnhoakjkgaieabnkmgdkb
MIT License
818 stars 66 forks source link

Breaks paste in Google Sheets #63

Closed craigrouse closed 6 years ago

craigrouse commented 6 years ago

For a while now, when I cut or copy items in Google Sheets cells, I've been unable to paste them. I just went through an exercise of disabling extensions 1 by 1 and found that DFWP seems to be the extension causing this issue. As soon as I turn it off, I can paste again. When I turn it on, it breaks again. Let me know if you need further information.

May I take the opportunity to say thanks for your hard work on this extension!

jswanner commented 6 years ago

When you are on Google Sheets, what color is the extension's icon (blue or grey)?

If blue, what rules does you have setup? Shortcut to see them all, open a tab to the following: chrome://extensions/?options=nkgllhigpcljnhoakjkgaieabnkmgdkb

cadtek91 commented 6 years ago

For me, it was blue and I do not have any rules setup. If I left-clicked the icon, then cancelled the rule setup on Sheets, it deactivated (went to grey) and it worked fine. So seems like it defaulted to on for Sheets.

craigrouse commented 6 years ago

@jswanner I have the same issue as @cadtek91. Sorry for the late reply.

The icon is blue initially, even though I have no rules set up.

jswanner commented 6 years ago

I'm trying to understand this sentence:

If I left-clicked the icon, then cancelled the rule setup on Sheets, it deactivated (went to grey) and it worked fine.

My first understanding of it was that you had an existing rule that was matching the Sheets URL and you've removed it, which fixed the problem. But, when you open the extension's popup (by clicking on its icon), it'll suggest a rule based on the current tab's URL, so perhaps you just removed the contents of that suggested rule. HTML's builtin templating isn't very robust, which has made it tricky for me to have that interface be very intuitive. Right now, the way you can tell between an existing rule and a suggested one is that there will be an "X" button on the right side of an existing rule. I have an idea I can try to make that interface better.

The extension popup does not show all rules, only those that match the current URL (or the suggested one if nothing matches). To see all your rules go to chrome://extensions/?options=nkgllhigpcljnhoakjkgaieabnkmgdkb (or open the extension preference page, click "Details" for this extension, then "Extension options"). If you have no rules, that screen should look like the following:

image

craigrouse commented 6 years ago

@jswanner in my case, I had a default config (no rules at all for any site). I had to add a rule for sheets, delete it again, and then finally the icon went grey. I never added any rules since the switch from whitelist to blacklist in v2. In the default state, DFWP was enabled for Google Sheets.

However, I just did a test and installed DFWP in a new Chrome profile, and it didn't exhibit this behaviour. I can only assume that the issue only affects those who had the extension installed prior to v2 and subsequently upgraded. Sorry - I know this is pretty useless information to help you reproduce the issue.

I'm happy now it's working for me anyway.

jswanner commented 6 years ago

The v1.x versions had a default of 1 backlist pattern (.*) and a handful of whitelist patterns.

The upgrade process for v2 checks the old blacklist patterns, and converts any pattern that doesn't match the old default into a new rule. The ideal behind that was for those that had changed the default blacklist pattern and/or added additional blacklist patterns, those changes would be carried over into v2.

I'm concerned that perhaps that perhaps that was the root of this problem, as you could have had a similar broad-matching blacklist pattern (something like https?://.*), which would have been converted into a new rule. And, since v2 no longer takes the old whitelist into account, sites that previously wouldn't have caused v1 to be active will cause v2 to be active. That was why I was asking about all rules that were defined.

Exposing the state of the extension for any given site (via the color of the extension icon) was important to me with v2, as previous versions did not provide any kind of feedback as to whether the extension was active for a given site.

klepper commented 6 years ago

yup, still doesn't work. no rules.

jswanner commented 6 years ago

@klepper, would you be willing to screenshare with me sometime, so that I may debug the issue?

slavaaaaaaaaaa commented 6 years ago

Just wanted to mention I'm having the same issue - it actually seems copy is the part that refuses to work.

jswanner commented 6 years ago

@smaslennikov, same screensharing question to you: would you be willing to help me debug this issue?

jswanner commented 6 years ago

I'm hoping the problem you all were experiencing was the same as what was described in #64, where the person had an empty rule, which matched all sites.

I've released version 2.4 that includes fixes for empty rules.

jswanner commented 6 years ago

I'm assuming version 2.4 fixed the issue. Closing due to inactivity.