diff --git a/src/quicktemplates2/qquickdialog.cpp b/src/quicktemplates2/qquickdialog.cpp
index 43f6b6a5..379380f0 100644
--- a/src/quicktemplates2/qquickdialog.cpp
+++ b/src/quicktemplates2/qquickdialog.cpp
@@ -190,6 +190,9 @@ QQuickDialog::QQuickDialog(QObject *parent)
     connect(d->popupItem, &QQuickPopupItem::implicitHeaderHeightChanged, this, &QQuickDialog::implicitHeaderHeightChanged);
     connect(d->popupItem, &QQuickPopupItem::implicitFooterWidthChanged, this, &QQuickDialog::implicitFooterWidthChanged);
     connect(d->popupItem, &QQuickPopupItem::implicitFooterHeightChanged, this, &QQuickDialog::implicitFooterHeightChanged);
+    auto pi = d->popupItem;
+    connect(this, &QObject::objectNameChanged,
+            [pi](QString n) {pi->setObjectName(n + QLatin1String("_popupItem")); });
 }
 
 /*!
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index cc2f4358..70e4380c 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -478,6 +478,7 @@ void QQuickPopupPrivate::finalizeEnterTransition()
 void QQuickPopupPrivate::finalizeExitTransition()
 {
     Q_Q(QQuickPopup);
+    qDebug() << __FUNCTION__ << q;
     getPositioner()->setParentItem(nullptr);
     popupItem->setParentItem(nullptr);
     popupItem->setVisible(false);
diff --git a/src/quicktemplates2/qquickshortcutcontext.cpp b/src/quicktemplates2/qquickshortcutcontext.cpp
index 4e4b46fa..765c663f 100644
--- a/src/quicktemplates2/qquickshortcutcontext.cpp
+++ b/src/quicktemplates2/qquickshortcutcontext.cpp
@@ -48,31 +48,50 @@ QT_BEGIN_NAMESPACE
 
 static bool isBlockedByPopup(QQuickItem *item)
 {
-    if (!item || !item->window())
+    qDebug() << __FUNCTION__ << item;
+    if (!item || !item->window()) {
+        qDebug() << __FUNCTION__ << "No win!";
         return false;
+    }
+
 
     QQuickOverlay *overlay = QQuickOverlay::overlay(item->window());
     const auto popups = QQuickOverlayPrivate::get(overlay)->stackingOrderPopups();
+    qDebug() << __FUNCTION__ << "popups=" << popups;
     for (QQuickPopup *popup : popups) {
-        if (qobject_cast<QQuickToolTip *>(popup))
-            continue; // ignore tooltips (QTBUG-60492)
+        qDebug() << __FUNCTION__ << "loop" << popup;
+        if (qobject_cast<QQuickToolTip *>(popup)) {
+            qDebug() << __FUNCTION__ << "skip TT" << popup;
+            continue; // ignore tooltips (QTBUG-60492)            
+        }
         if (popup->isModal() || popup->closePolicy() & QQuickPopup::CloseOnEscape) {
             if (QQuickMenu *menu = qobject_cast<QQuickMenu *>(popup)) {
-                if (qobject_cast<QQuickMenuBarItem *>(menu->parentItem()))
+                if (qobject_cast<QQuickMenuBarItem *>(menu->parentItem())) {
+                    qDebug() << __FUNCTION__ << "skip MB";
                     continue;
+                }
             }
-            return item != popup->popupItem() && !popup->popupItem()->isAncestorOf(item);
+            auto ne = item != popup->popupItem();
+            auto na = !popup->popupItem()->isAncestorOf(item);
+            auto r = ne && na;
+            qDebug() << __FUNCTION__ << item << "ne=" << ne << "na" << na << "rets" << r;
+            return r;
         }
     }
+    qDebug() << __FUNCTION__ << item << "fallthrough rets false";
 
     return false;
 }
 
 bool QQuickShortcutContext::matcher(QObject *obj, Qt::ShortcutContext context)
 {
+    qDebug() << "QQuickShortcutContext" << __FUNCTION__ << obj << context
+             << "top levels=" << QGuiApplication::topLevelWindows();
     QQuickItem *item = nullptr;
     switch (context) {
+    bool r, blocked;
     case Qt::ApplicationShortcut:
+        qDebug() << __FUNCTION__ << "App->true";
         return true;
     case Qt::WindowShortcut:
         while (obj && !obj->isWindowType()) {
@@ -89,7 +108,12 @@ bool QQuickShortcutContext::matcher(QObject *obj, Qt::ShortcutContext context)
         }
         if (QWindow *renderWindow = QQuickRenderControl::renderWindowFor(qobject_cast<QQuickWindow *>(obj)))
             obj = renderWindow;
-        return obj && obj == QGuiApplication::focusWindow() && !isBlockedByPopup(item);
+        blocked = isBlockedByPopup(item);
+        r = obj && obj == QGuiApplication::focusWindow() && !blocked;
+        qDebug() << __FUNCTION__ << "obj=" << obj << "blocked =" << blocked << "focusWindow="
+                 << QGuiApplication::focusWindow()
+                 << "returns" << r;
+        return r;
     default:
         return false;
     }
