From ec2337fd181e6dea02bf50c57400eaa6c5ec2871 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Wed, 28 Nov 2018 15:23:56 +0100 Subject: Disable external text handles and edit menu Chromium implements its own ones and we don't want to conflict with them. This disables the QtVirtualKeyboard's selection handle what is not functional with QtWebEngine. Task-number: QTBUG-59999 Change-Id: I6a615a04d5eac1ce2d0392d63ba0fc9039583914 Reviewed-by: Allan Sandfeld Jensen --- src/core/render_widget_host_view_qt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/render_widget_host_view_qt.cpp') diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 99bda12d1..40ed75973 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -754,7 +754,7 @@ void RenderWidgetHostViewQt::OnUpdateTextInputStateCalled(content::TextInputMana } ui::TextInputType type = getTextInputType(); - m_delegate->setInputMethodHints(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText); + m_delegate->setInputMethodHints(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText | Qt::ImhNoTextHandles | Qt::ImhNoEditMenu); m_surroundingText = QString::fromStdString(state->value); // Remove IME composition text from the surrounding text @@ -1112,7 +1112,7 @@ QVariant RenderWidgetHostViewQt::inputMethodQuery(Qt::InputMethodQuery query) // TODO: Implement this return QVariant(); // No limit. case Qt::ImHints: - return int(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText); + return int(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText | Qt::ImhNoTextHandles | Qt::ImhNoEditMenu); default: return QVariant(); } -- cgit v1.2.3