QupZilla / qupzilla

Cross-platform Qt web browser
http://www.qupzilla.com
GNU General Public License v3.0
1.11k stars 350 forks source link

Autoscroll plugin does not honor some links #2616

Closed ghost closed 6 years ago

ghost commented 6 years ago

On some pages like that for example, when the Autoscroll plugin is enabled, a middle click over the link activates the auto scrolling instead of open link in new tab. By the way i solved that as follow:

diff --git a/src/plugins/AutoScroll/autoscroller.cpp b/src/plugins/AutoScroll/autoscroller.cpp
index 65da1d1..63a3743 100644
--- a/src/plugins/AutoScroll/autoscroller.cpp
+++ b/src/plugins/AutoScroll/autoscroller.cpp
@@ -220,7 +220,7 @@ bool AutoScroller::showIndicator(WebView* view, const QPoint &pos)
 {
     const WebHitTestResult res = view->page()->hitTestContent(pos);

-    if (res.isContentEditable() || !res.linkUrl().isEmpty() || res.tagName().endsWith(QL1S("frame"))) {
+    if (res.isContentEditable() || !res.linkUrl().isEmpty() || res.tagName().endsWith(QL1S("frame")) || res.tagName() == QL1S("a")) {
         return false;
     }

but perhaps some better solution is possible?

ghost commented 6 years ago

The issue is now affects the thumbnail links :innocent:

nowrep commented 6 years ago

What?

ghost commented 6 years ago

Activate autoscroll and do middle click on some image where refers to some address. For example the github logo on top of the page!

nowrep commented 6 years ago

Sorry, fixed.

ghost commented 6 years ago

Perfect, thanks!