ssborbis / ContextSearch-web-ext

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

Quick menu and mouse middle button trigger #626

Closed MW-J97 closed 1 year ago

MW-J97 commented 1 year ago

When I use the mouse middle button as a trigger to show the qm, the middle button main function as autoscroll is not disabled at many times. I mean, this below sign appears also with the qm. image Is there any way to disable middle button autoscroll even completely? I found this extension that has a code to disable it. Can it be added to the middle button trigger of qm? https://chrome.google.com/webstore/detail/disable-autoscroll/ggakmjgkpoeoiicikoohgojkoehmnhdc/related

ssborbis commented 1 year ago

Which opening option are you using? Simple click? Mouse?

MW-J97 commented 1 year ago

Which opening option are you using? Simple click? Mouse?

Mouse

ssborbis commented 1 year ago

autoscroll is not disabled at many times.

i think the middle-mouse will currently only work when text is selected. Are you having problems when text is highlighted, or only when trying to open the menu on other elements ( images, links, page, etc ) ?

MW-J97 commented 1 year ago

Are you having problems when text is highlighted, or only when trying to open the menu on other elements ( images, links, page, etc ) ?

Yes, it also appears with text. @ssborbis It only disappears now when I turn on this above extension.

ssborbis commented 1 year ago

Odd, I'm not experiencing that problem, but I was testing on a virtual machine. Selecting text and using the middle mouse seemed to bypass the scroll and open the menu every time. There is code to suppress autoscroll when text is highlighted, so I'm not sure why it's not working for you.

MW-J97 commented 1 year ago

It's not working on text, links and images. It sometimes works and sometimes not. Can it be an issue in Chrome??

ssborbis commented 1 year ago

Can it be an issue in Chrome??

I can't say for sure. A conflict with another addon? I did test in chrome on windows and didn't see any issues ( with selected text. It won't work with images and links atm )

MW-J97 commented 1 year ago

I can't say for sure. A conflict with another addon? I did test in chrome on windows and didn't see any issues ( with selected text. It won't work with images and links atm )

I am using it more with images. Maybe this why it appears many times with me. But, what can conflict with it?? Or is there any script that can make it works?

ssborbis commented 1 year ago

But, what can conflict with it??

I'm not sure it is a conflict. I'm just trying to account for you seeing the bug and I'm not. It may indeed be a bug in this code, but I haven't been able to spot it.

Or is there any script that can make it works?

Have you tried enabling the Simple Click opening option with the middle mouse? I think that does work on images and links and I believe it has auto-scroll suppression code too, and may work in your case.

MW-J97 commented 1 year ago

Have you tried enabling the Simple Click opening option with the middle mouse?

Yes, it's working with words, but not with images.

ssborbis commented 1 year ago

Yes, it's working with words, but not with images.

Try enabling useInnerText in advanced options. I think that's why it's working for me

"quickMenuOnSimpleClick": {
        "alt": false,
        "button": 2,
        "ctrl": false,
        "enabled": true,
        "shift": false,
        "useInnerText": true
    },
MW-J97 commented 1 year ago

Try enabling useInnerText in advanced options.

Still showing the same automatic scroll 😅

ssborbis commented 1 year ago

Can you send me your config? I'm wondering if there's a conflicting setting in there somewhere. i cannot seem to reproduce that bug

MW-J97 commented 1 year ago

ContextSearchOptions_2023-03-16_061217.zip

ssborbis commented 1 year ago

Yeah, I'm not having any issues, but I did notice that Simple Click was not enabled, and had to enable it and disable Mouse to work on images without autoscroll

MW-J97 commented 1 year ago

Simple Click was not enabled

No, I enabled it and re-disabled it again as I wasn't using it. So, what can be causing this issue in chrome?

ssborbis commented 1 year ago

So, what can be causing this issue in chrome?

I couldn't say. Does the same thing happen in a new profile, or with all other addons disabled?

Using Chrome in Windows 10, I have Simple Click enabled as the only opening method, set to middle button with no modifier keys, and quickMenuOnSimpleClick.useInnerText enabled. I did need to refresh the page with images I was using to test before the changes took effect.

MW-J97 commented 1 year ago

Does the same thing happen in a new profile, or with all other addons disabled?

Yes, it still shows with all add-ons disabled.

Simple Click

I tried it again, it works, but it has an issue at some sites at which the middle button function is to open the clicked image or word in a new tab.

ssborbis commented 1 year ago

I tried it again, it works, but it has an issue at some sites at which the middle button function is to open the clicked image or word in a new tab.

Which websites so I can test

MW-J97 commented 1 year ago

Which websites so I can test

Imgur for example.

ssborbis commented 1 year ago

This is working better in the development code, but only on images. I think I can add an option to suppress the default middle mouse action ( open links, scroll ). It should be in the next release.

MW-J97 commented 1 year ago

I think I can add an option to suppress the default middle mouse action ( open links, scroll )

It'll be perfect if there is something like this.

It should be in the next release.

Will it be soon?

ssborbis commented 1 year ago

I'll try to get a minor release out soon. Would you mind testing the code in the Master branch to see if it solves your issue? You'll need to set advanced option quickMenuPreventLinksOnMiddleButton to true

MW-J97 commented 1 year ago

I enabled it. It works with "Simple click", but still pressing on some things make it open those in a new tab, like pressing on a title of a post in Imgur. It doesn't work with "Mouse".

ssborbis commented 1 year ago

I enabled it. It works with "Simple click", but still pressing on some things make it open those in a new tab, like pressing on a title of a post in Imgur. It doesn't work with "Mouse".

It should ONLY work with Mouse and not Simple Click. I'm confused why it's not working for you. I'll keep testing.

MW-J97 commented 1 year ago

It should ONLY work with Mouse and not Simple Click. I'm confused why it's not working for you. I'll keep testing.

I really don't know, I tried testing it many times with the same result.

ssborbis commented 1 year ago

I'm using your config with the latest code on the MASTER branch, and I'm not having any problem.

Your config is set to open on Mouse with Hold + Middle button The advanced option quickMenuPreventLinksOnMiddleButton is set to false ( i think it would only be required for Click, not Hold )

(edit) And I've been testing on imgur. Are you testing with other addons disabled to check for conflicts?

ssborbis commented 1 year ago

1.46.6 going up now

If you're still having problems, you might need to simply use another method until I can reproduce the bug on my machine.

MW-J97 commented 1 year ago

I disabled all extensions and updated it again, but still the same issue. It appears when I press the Middle button

ssborbis commented 1 year ago

It appears when I press the Middle button

Just to be clear, the scroll icon appears when you press ( mousedown ) the middle button over links, images, etc? The icon appears when the button is pressed down, not when the button is released? Is this scroll icon only a Chrome thing, or is it an OS thing and appears when pressing the middle mouse in other applications?

I've tested in a virtual box on windows 10 + Chrome, but can't see the problem. I'm wondering if it's due to a difference in OS's, mouse, mouse drivers, etc. I'll continue to look, but I'm running out of ideas.

MW-J97 commented 1 year ago

the scroll icon appears when you press ( mousedown ) the middle button over links, images, etc?

Yes, but more with text.

The icon appears when the button is pressed down, not when the button is released?

When released.

Is this scroll icon only a Chrome thing, or is it an OS thing and appears when pressing the middle mouse in other applications?

I think it's a chrome thing, as I don't experience it on Windows itself. I don't see it on other apps

ssborbis commented 1 year ago

Ok, I'm seeing it now. I'll let you know what I come up with

MW-J97 commented 1 year ago

Okay, thank you so much for help

ssborbis commented 1 year ago

I have some changes in the Master branch that may fix the problem. I'm altering some fundamental mouse button handlers, so I could use some beta testing before releasing.

I've added two advanced options

    quickMenuPreventLinksOnMiddleButton: true,
    quickMenuPreventScrollOnMiddleButton: false,

The main problems I'm running into attempting to test are due to browser differences and OS differences. My virtual box Windows setup may not elicit the same bugs you're seeing. When you get a chance, please try the latest Master branch code, and be sure to set that Scroll option to true. I'll keep updating that branch with new code as I go.

ssborbis commented 1 year ago

Oh, and I've only worked on Mouse click and Mouse hold so far. Nothing on Simple Click yet

MW-J97 commented 1 year ago

I tried it again with enabling those 2 features and the same result, still having the same issue. I think it's related to chrome. Can't we add this above extension code to just block this auto-scroll feature??

ssborbis commented 1 year ago

I tried it again with enabling those 2 features and the same result, still having the same issue. I think it's related to chrome. Can't we add this above extension code to just block this auto-scroll feature??

My code is essentially identical. I did move the event to the document vs the current element in a recent push, so give it another try. That's the only thing I can think of that would possibly make a difference. It has been working fine for me though, so ¯\_(ツ)_/¯

MW-J97 commented 1 year ago

give it another try

It works, thank you so much for help, dude. When will it be released?

ssborbis commented 1 year ago

It works, thank you so much for help, dude.

Phew! Good deal.

When will it be released?

I need to do some testing first on various platforms, but it should be in a couple days.

ssborbis commented 1 year ago

1.46.8 going live now

MW-J97 commented 1 year ago

1.46.8 going live now

I tested it and it works very well. Thank you so much for your help. I noticed it prevents the auto-scroll when I on a word, image or link, but when I am anything else non-clickable, then it appears. But, I think this is useful, as auto-scroll may be very useful at times.

ssborbis commented 1 year ago

Glad to hear it's working as expected.

I noticed it prevents the auto-scroll when I on a word, image or link, but when I am anything else non-clickable, then it appears. But, I think this is useful, as auto-scroll may be very useful at times.

Does that happen if you check the box for Open Anywhere? I'm not sure I tested that.

image

MW-J97 commented 1 year ago

Does that happen if you check the box for Open Anywhere? I'm not sure I tested that.

No, it's not marked. But, I mean the auto-scroll what appears, not the qm. It's still useful, I think disabling it at all is not a good idea.

ssborbis commented 1 year ago

Checking Open Anywhere allows the qm to open on non-contextual elements ( page, iframe, etc ). This may cause the auto-scroll feature to be suppressed everywhere on the page so it never shows, but I don't think I ever checked if it actually did. Just something to try if you really need to get rid of the auto-scroll...

I'll close this issue out, but please re-open if anything goes wrong.