summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2021-01-29 10:25:53 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-01 17:38:22 +0000
commitddc1805fa24fa3ca6803ba693a5ac882037042b2 (patch)
tree63e23ddf0969095bdb14f7613efd58944835dd95
parente255716291183ac374a14314f7acf07cbb681223 (diff)
iOS: always hide edit menu when showing the magnifier glass
Bug: If you do a press and hold on a line edit, the edit menu will show to let you select a word etc. If you now do another press and hold to bring back the magnifier glass, the edit menu will stay open while you move the magnifier glass. This patch will ensure that we always hide the edit menu when we show the magnifier. There is never a case where both of them should show at the same time. By hiding the menu from the place where we show the magnifier means that we can remove code from the QIOSSelectionRecognizer that used to do this for one of the cases from before. Fixes: QTBUG-90743 Change-Id: If2a92f94422c730c2b223129d96f5bc3bf3deeee Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 3811be28adc9022f7a7ac1a15385ae91beaf9889) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/plugins/platforms/ios/qiostextinputoverlay.mm7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/plugins/platforms/ios/qiostextinputoverlay.mm b/src/plugins/platforms/ios/qiostextinputoverlay.mm
index 89ace50a82..15be19c6bc 100644
--- a/src/plugins/platforms/ios/qiostextinputoverlay.mm
+++ b/src/plugins/platforms/ios/qiostextinputoverlay.mm
@@ -492,6 +492,7 @@ static void executeBlockWithoutAnimation(Block block)
[self createLoupe];
[self updateFocalPoint:QPointF::fromCGPoint(_lastTouchPoint)];
_loupeLayer.visible = YES;
+ QIOSTextInputOverlay::s_editMenu.visible = NO;
break;
case UIGestureRecognizerStateChanged:
// Tell the sub class to move the loupe to the correct position
@@ -848,12 +849,6 @@ static void executeBlockWithoutAnimation(Block block)
return;
}
- if (_dragOnCursor || _dragOnAnchor) {
- // Ensure that the edit menu is hidden while
- // the user drags on any of the handles.
- QIOSTextInputOverlay::s_editMenu.visible = NO;
- }
-
if (!_cursorLayer.visible && QIOSTextInputOverlay::s_editMenu.isHiding) {
// Since the edit menu is hiding and this is the first selection thereafter, we
// assume that the selection came from the user tapping on a menu item. In that