diff options
Diffstat (limited to 'src/3rdparty/webkit')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp | 6 |
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 c1ca23d..2d74d4b 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) |