diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2021-01-29 10:25:53 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2021-02-01 14:50:33 +0100 |
commit | 3811be28adc9022f7a7ac1a15385ae91beaf9889 (patch) | |
tree | 266b6aa11109d19d941220e5db7d39af9725b2a6 /src/plugins/platforms/ios | |
parent | 93243b5d6a6726087aeec387366ca699cad4e31c (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.
Pick-to: 6.0 5.15
Fixes: QTBUG-90743
Change-Id: If2a92f94422c730c2b223129d96f5bc3bf3deeee
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/ios')
-rw-r--r-- | src/plugins/platforms/ios/qiostextinputoverlay.mm | 7 |
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 |