CanisLupus / swift-selection-search

Swift Selection Search (SSS) is a simple Firefox add-on that lets you quickly search for some text in a page using your favorite search engines.
https://addons.mozilla.org/firefox/addon/swift-selection-search/
MIT License
222 stars 26 forks source link

"Copy as plain-text" feature does not work in Firefox. #254

Closed furuycom closed 1 year ago

furuycom commented 2 years ago

"Copy as plain-text" feature does not work in Firefox.

Steps to reproduce the behavior:

  1. Go to Options
  2. Click on "Copy to clipboard"
  3. Activate the "Copy as plain-text" option.
  4. Try it on a website.

System info:

CanisLupus commented 2 years ago

Hi furkun! When you say it doesn't work, what does it do? Does normal copy (not plain-text) work as normal? Does the problem persist after disabling all other extensions?

Sorry for all the questions :) I have tested on my end (Firefox 105.0.3, Windows 11) and both normal copy and plain-text copy seem to be working as normal, so I wonder what's the cause for the problem you are seeing. NOTE: I don't have a Linux system to test on, if that's the source of the problem somehow.

Cheers!

furuycom commented 2 years ago

@CanisLupus Hi, sorry for not being descriptive enough about this issue. Copy functions work as normal but "copy as plain-text" feature doesn't work in popup only. Disabling all extensions did not fix the problem.

CanisLupus commented 2 years ago

Sorry for the delay! Thank you so much for the video. It does show the issue clearly but sadly I can't reproduce the same on my end. This is actually very strange since both the popup and the context menu should run the exact same code after clicking the engine (onSearchEngineClick, in the source code), so I wonder what else may be going on here.

Does this happen for all websites you've tried it on? But it does work on GitHub for me... I wonder if this is a browser setting. Or a permission issue of some sort. Copying as plain text in SSS requires registering with the copy event before copying, so that SSS can mark the contents of the copy as type "text/plain", so perhaps something is forbidding doing that from a button in a webpage (which the SSS popup is, essentially) but not from the context menu. Just a very wild guess.

Gitoffthelawn commented 1 year ago

@furkun By any chance, do you have other browser extensions enabled? If so, can you test without those extensions enabled to help isolate the issue?

furuycom commented 1 year ago

Sorry for the delay. I had disabled the "dom.event.clipboardevents.enabled" preference. After enabling this preference again, the problem was solved. Thanks for your efforts.

CanisLupus commented 1 year ago

Nice, no worries! Thanks for letting us know :)