iOS: close edit menu upon focus transfer

If you select text, the edit menu will show.
But if you tap directly inside another input
field, and as such, transfer focus, the menu
will continue to stay visible.

This patch will ensure that we hide the edit
menu when the input field that it was
requested for looses focus.

Pick-to: 6.0 6.1 5.15
Fixes: QTBUG-90937
Change-Id: I1d97bd57fc793826a3170404795b06a1e058d1b7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
bb10
Richard Moe Gustavsen 2021-02-04 16:09:24 +01:00
parent ef763e1958
commit 0bae5fbabb
1 changed files with 3 additions and 0 deletions

View File

@ -751,6 +751,9 @@ static void executeBlockWithoutAnimation(Block block)
QObject::disconnect(_cursorConnection);
QObject::disconnect(_anchorConnection);
QObject::disconnect(_clipRectConnection);
if (QIOSTextInputOverlay::s_editMenu.shownByUs)
QIOSTextInputOverlay::s_editMenu.visible = NO;
}
}