diff options
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index 6e3718e0..e874411d 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -66,6 +66,7 @@ WebView::WebView(QWidget* parent) , _scrollTimer( new QTimer(this) ) , _VScrollSpeed(0) , _HScrollSpeed(0) + , _disableAutoScroll(false) { WebPage *page = new WebPage(this); setPage(page); @@ -320,6 +321,9 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) void WebView::mousePressEvent(QMouseEvent *event) { + QWebHitTestResult result = page()->mainFrame()->hitTestContent( event->pos() ); + _disableAutoScroll = result.isContentEditable(); + switch(event->button()) { case Qt::XButton1: @@ -425,6 +429,12 @@ void WebView::keyPressEvent(QKeyEvent *event) return; } } + + if(_disableAutoScroll) + { + KWebView::keyPressEvent(event); + return; + } // Auto Scrolling if ( event->modifiers() == Qt::ShiftModifier ) |