summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
index 67ce708..94f08bd 100644
--- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
@@ -91,7 +91,6 @@ GraphicsWebView::GraphicsWebView(QDeclarativeWebView* parent)
void GraphicsWebView::mousePressEvent(QGraphicsSceneMouseEvent* event)
{
- setFocus();
pressPoint = event->pos();
if (pressTime) {
pressTimer.start(pressTime, this);
@@ -101,6 +100,11 @@ void GraphicsWebView::mousePressEvent(QGraphicsSceneMouseEvent* event)
parent->setKeepMouseGrab(true);
}
QGraphicsWebView::mousePressEvent(event);
+
+ QWebHitTestResult hit = page()->mainFrame()->hitTestContent(pressPoint.toPoint());
+ if (hit.isContentEditable())
+ parent->forceActiveFocus();
+ setFocus();
}
void GraphicsWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)