diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp
index 979fc161bcdf4324f9b617068b982f3bd04e02e0..6e81656ad6fed975be539269de058fc01fe425d3 100644
--- a/src/declarative/items/qsgcanvas.cpp
+++ b/src/declarative/items/qsgcanvas.cpp
@@ -70,6 +70,13 @@ DEFINE_BOOL_CONFIG_OPTION(qmlNoThreadedRenderer, QML_BAD_GUI_RENDER_LOOP)
 
 extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha);
 
+void QSGCanvasRenderLoop::updateFocusItemTransform()
+{
+    QSGItem *focus = renderer->activeFocusItem();
+    if (focus && qApp->inputPanel()->inputItem() == focus)
+        qApp->inputPanel()->setInputItemTranform(QSGItemPrivate::get(focus)->itemToCanvasTransform());
+}
+
 class QSGCanvasPlainRenderLoop : public QObject, public QSGCanvasRenderLoop
 {
 public:
@@ -85,6 +92,7 @@ public:
     virtual void paint() {
         if (animationRunning && animationDriver())
             animationDriver()->advance();
+        updateFocusItemTransform();
         syncSceneGraph();
         makeCurrent();
         glViewport(0, 0, size.width(), size.height());
@@ -2030,6 +2038,7 @@ void QSGCanvasRenderThread::sync(bool guiAlreadyLocked)
     renderThreadAwakened = false;
 
     polishItems();
+    updateFocusItemTransform();
 
     wake();
     wait();
diff --git a/src/declarative/items/qsgcanvas_p.h b/src/declarative/items/qsgcanvas_p.h
index acd52a8a2a5d48083d0885d2b2f2501381c87522..b0c63f0d0112ed71346c7a5860ad4cdb96bc7759 100644
--- a/src/declarative/items/qsgcanvas_p.h
+++ b/src/declarative/items/qsgcanvas_p.h
@@ -68,6 +68,7 @@
 #include <qopenglcontext.h>
 #include <QtGui/qopenglframebufferobject.h>
 #include <QtGui/qevent.h>
+#include <QtGui/qinputpanel.h>
 
 QT_BEGIN_NAMESPACE
 
@@ -204,6 +205,7 @@ protected:
     void renderSceneGraph(const QSize &size) { d->renderSceneGraph(size); }
     void polishItems() { d->polishItems(); }
     QAnimationDriver *animationDriver() const { return d->animationDriver; }
+    void updateFocusItemTransform();
 
     inline QOpenGLContext *glContext() const { return gl; }
     void createGLContext();