From e0e6a4d9c9aacadd40699d0b85a6fff8dcf9010a Mon Sep 17 00:00:00 2001 From: ia_oi Date: Tue, 24 Sep 2024 10:57:49 +0800 Subject: [PATCH] =?UTF-8?q?web=E5=A4=B1=E5=8E=BB=E7=84=A6=E7=82=B9input?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=81=A2=E5=A4=8D=E9=80=89=E4=B8=AD=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ia_oi --- libcef/browser/osr/touch_selection_controller_client_osr.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libcef/browser/osr/touch_selection_controller_client_osr.cc b/libcef/browser/osr/touch_selection_controller_client_osr.cc index 902d1b235..ed21cf2fa 100644 --- a/libcef/browser/osr/touch_selection_controller_client_osr.cc +++ b/libcef/browser/osr/touch_selection_controller_client_osr.cc @@ -431,10 +431,12 @@ void CefTouchSelectionControllerClientOSR::ExecuteCommandMouse(int command_id, MouseSelectMenuShow(false); RunContextMenu(); host_delegate->ExecuteEditCommand("Unselect", value); + browser->web_contents()->CollapseSelection(); break; default: MouseSelectMenuShow(false); host_delegate->ExecuteEditCommand("Unselect", value); + browser->web_contents()->CollapseSelection(); break; } } @@ -988,14 +990,14 @@ void CefTouchSelectionControllerClientOSR::ExecuteCommand(int command_id, CloseQuickMenu(); RunContextMenu(); #ifdef OHOS_CLIPBOARD - host_delegate->ExecuteEditCommand("Unselect", value); + browser->web_contents()->CollapseSelection(); #endif // #ifdef OHOS_CLIPBOARD break; default: // Invalid command, do nothing. // Also reached when callback is destroyed/cancelled. #ifdef OHOS_CLIPBOARD - host_delegate->ExecuteEditCommand("Unselect", value); + browser->web_contents()->CollapseSelection(); #endif // #ifdef OHOS_CLIPBOARD break; } -- Gitee