[WebKit-devel] Middle click to navigate issue [bug #211302]

Dawit A. adawit at kde.org
Sun Oct 25 05:58:43 CET 2009


The code in kwebview.cpp (line #126) is meant to allow people to navigate to  
a url from the selection clipboard by clicking the middle mouse button. 
Unfortunately it is also the cause for the bug report below:

https://bugs.kde.org/show_bug.cgi?id=211302

The bug happens because no check is made to determine where the middle click 
occurred. However, adding such check is no easy feat as none of the available 
function, including contentSize(), tell us when the click occurs outside the 
content window! Any ideas on how to solve this issue ? Should that code be 
disabled until the outstanding bug can be fixed ?

Anyhow, you can add the following debug statements in 
WebView::mouseReleaseEvent to see what I mean:

kDebug() << "Mouse position :" << event->pos();
kDebug() << "Viewport size  :" << page()->viewportSize();
kDebug() << "View geometry :" << page()->view()->geometry();
kDebug() << "Frame geometry :" << page()->mainFrame()->geometry();






More information about the WebKit-devel mailing list