swift-selection-search icon indicating copy to clipboard operation
swift-selection-search copied to clipboard

Popup appears when clicking on a link after performing Find operation

Open Gitoffthelawn opened this issue 6 years ago • 5 comments

Greetings! I hope you are doing well!

I've noticed a little quirk that perhaps could be fixed: After you use Firefox to search for text, it highlights that text. Then if you click any link on the page, the extension will show it's popup on the highlighted text even though you are immediately leaving the page.

This is a bit more, um, icky (lol), when the search string is actually contained in the link you click. In this case, the popup appears right next to where you click, but is (hopefully) ignored. (In other cases, it pops up at another location in the page.)

Tested on Firefox 64-bit v63.0.3.

Be well, my friend. :smiley:

Gitoffthelawn avatar Apr 25 '19 18:04 Gitoffthelawn

Greetings! I'm doing alright, thank you. I hope you are too. :)

I'm always surprised by these edge cases. Never noticed this until now! It seems to be a combination of things. I suppose the search highlight counts as a text selection internally, but it really shouldn't. Since SSS only checks for selections when using certain keys or mouse buttons, using the search function isn't one of them and so the selection is only triggered when the click happens (since it's a click on a link, the text selection stays; anywhere else it would be removed first).

In any case, highlights are not selections, so this shouldn't happen. Maybe there's a way to differentiate them.

I have been replying but not working on SSS for a while (other priorities!) but when I return I'll definitely look into this and give more feedback here.

Thank you for the report! ;) Always appreciated.

Cheers, Daniel

CanisLupus avatar Apr 28 '19 10:04 CanisLupus

Glad you are doing alright. I am doing well... too busy, but otherwise things are really good.

It seems like edge cases are often where a lot of effort has to be applied, even though we rarely anticipate them.

I'll keep on eye on this thread to see if you have any questions when you start working on it again.

Take care of yourself... try to spend time doing what you love.

Gitoffthelawn avatar Apr 28 '19 18:04 Gitoffthelawn

Glad to hear it! :) (as long as you can find some relax-time amidst the busy) Also you are completely right about the edge cases heheh.

Thanks for understanding and, as always, for the kind words. <3 I'll let you know when I delve into this. All the best! :)

CanisLupus avatar Apr 28 '19 19:04 CanisLupus

I don't exactly have a big update about this, but I had some time to see what was happening and, as far as I could see, Firefox (maybe other browsers too) treat the search highlight as a selection (Firefox just paints it in another color).

So this strange issue would likely need to be solved through other means, maybe involving detecting clicks on links or detecting the last origin of a selection, or something similar. Unclear ;) Cheers!

CanisLupus avatar Jun 18 '19 18:06 CanisLupus

Thanks for the update!

From what I understand about what's going on, I concur completely.

Gitoffthelawn avatar Jun 19 '19 05:06 Gitoffthelawn