ssborbis / ContextSearch-web-ext

Search engine manager for modern browsers
318 stars 35 forks source link

Strange behaviour with images #648

Open Bhaalspawn opened 1 year ago

Bhaalspawn commented 1 year ago

Now i'm using right click, it's faster than middle click but i have problems with images/links

First: images that opens new pages are treated like links, but they are still images. there are very few images that doesn't expand or have a link incorporated...so i think it's a bit weird

Second: i choose double click to open context menu, but on images it's not working. when i double right click, the popup menu opens and on the second click, a context menu opens too but it's not the one for images, it's the one i get when i right click on blank spot on a web page

ssborbis commented 1 year ago

First: images that opens new pages are treated like links

Do you have an example?

ssborbis commented 1 year ago

First: images that opens new pages are treated like links

Oh wait, do you mean images that are encompassed by a link? Ok, that one is known. Let me see if I have a workaround for that.

Bhaalspawn commented 1 year ago

https://www.gazzetta.it/ click on the bigger image (now it's something about Gosens)

ssborbis commented 1 year ago

The default is to use the image URL over a link URL. Not sure why you're seeing differently. Could you post your config here?

ssborbis commented 1 year ago

I just checked that site with my config and the default config. Both use the image URL

Bhaalspawn commented 1 year ago

ContextSearchOptions_2023-06-17_000324.zip

ssborbis commented 1 year ago

I think it's because you don't have images enabled in the quick menu settings

image

Bhaalspawn commented 1 year ago

no because i don't want the quick menu to be active on images and in fact it doesn't appear when i click on images like the ones in amazon (images that don't open new tabs links) since "link" has its own setting i'm sayiong that all images should be treated in the same way even the ones with links

ssborbis commented 1 year ago

Try disabling quickMenuPreventPageClicks

I'll need to look into why exactly this happens, but that seems to be the issue.

Bhaalspawn commented 1 year ago

i tried but it didn't solve the problem

ssborbis commented 1 year ago

Hmm... ok, just so we're on the same page.

Using your config, as sent, I get this when double-clicking:

before

After disabling quickMenuPreventPageClicks, I get this:

after

Are you seeing something different?

Bhaalspawn commented 1 year ago

oh ok so the double click to open image menu is working but since i didn't enable quick menu for images i was expecting i didn't need to double click but just standard click i thought the fix was for this

ssborbis commented 1 year ago

Ah. No, the code used to move the context menu to a double-click stays in place regardless of whether the menu is enabled on a particular type of element or not. That may be something worth looking into, however. Not sure which would be more confusing for the end user; staying consistent over all elements, or switching on / off. Something to think about...