diff --git a/src/plugins/platforms/ios/qiostextinputoverlay.mm b/src/plugins/platforms/ios/qiostextinputoverlay.mm index 9acb707e6f..5b9de72d8e 100644 --- a/src/plugins/platforms/ios/qiostextinputoverlay.mm +++ b/src/plugins/platforms/ios/qiostextinputoverlay.mm @@ -654,6 +654,7 @@ static void executeBlockWithoutAnimation(Block block) QIOSHandleLayer *_anchorLayer; QPointF _touchOffset; bool _dragOnCursor; + bool _dragOnAnchor; bool _multiLine; QTimer _updateSelectionTimer; QMetaObject::Connection _cursorConnection; @@ -794,9 +795,11 @@ static void executeBlockWithoutAnimation(Block block) if (cursorDist < anchorDist) { _touchOffset = cursorOffset; _dragOnCursor = YES; + _dragOnAnchor = NO; } else { _touchOffset = anchorOffset; _dragOnCursor = NO; + _dragOnAnchor = YES; } return YES; @@ -845,6 +848,12 @@ 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