summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/webview.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 2c2ea9a6..549c2df3 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -640,9 +640,10 @@ void WebView::keyPressEvent(QKeyEvent *event)
}
const QString tagName = page()->mainFrame()->evaluateJavaScript("document.activeElement.tagName").toString();
-
+ bool isContentEditable = page()->mainFrame()->evaluateJavaScript("document.activeElement.isContentEditable").toBool();
+ kDebug() << "DIT? " << isContentEditable;
// Auto Scrolling
- if (tagName != QL1S("INPUT") && tagName != QL1S("TEXTAREA") && event->modifiers() == Qt::ShiftModifier)
+ if (tagName != QL1S("INPUT") && tagName != QL1S("TEXTAREA") && !isContentEditable && event->modifiers() == Qt::ShiftModifier)
{
kDebug() << "AutoScrolling: " << event->key();
@@ -703,7 +704,7 @@ void WebView::keyPressEvent(QKeyEvent *event)
// vi-like navigation
if (ReKonfig::enableViShortcuts())
{
- if (tagName != QL1S("INPUT") && tagName != QL1S("TEXTAREA") && event->modifiers() == Qt::NoModifier)
+ if (tagName != QL1S("INPUT") && tagName != QL1S("TEXTAREA") && !isContentEditable && event->modifiers() == Qt::NoModifier)
{
kDebug() << "Using VI-LIKE modifiers: " << event->key();