summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/qt/QWebPopup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/qt/QWebPopup.cpp')
-rw-r--r--WebCore/platform/qt/QWebPopup.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/WebCore/platform/qt/QWebPopup.cpp b/WebCore/platform/qt/QWebPopup.cpp
index d463ddf..4d57c9b 100644
--- a/WebCore/platform/qt/QWebPopup.cpp
+++ b/WebCore/platform/qt/QWebPopup.cpp
@@ -22,7 +22,9 @@
#include "QWebPopup.h"
#include "PopupMenuStyle.h"
-#include <QCoreApplication>
+#include <QAbstractItemView>
+#include <QApplication>
+#include <QInputContext>
#include <QMouseEvent>
namespace WebCore {
@@ -54,6 +56,16 @@ void QWebPopup::showPopup()
void QWebPopup::hidePopup()
{
+ QWidget* activeFocus = QApplication::focusWidget();
+ if (activeFocus && activeFocus == view()
+ && activeFocus->testAttribute(Qt::WA_InputMethodEnabled)) {
+ QInputContext* qic = activeFocus->inputContext();
+ if (qic) {
+ qic->reset();
+ qic->setFocusWidget(0);
+ }
+ }
+
QComboBox::hidePopup();
if (!m_popupVisible)
return;