From c784864ea7733409d87974270a95284b1ca197ec Mon Sep 17 00:00:00 2001 From: jcg_814 Date: Fri, 11 Oct 2024 17:58:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=80=89=E4=B8=AD=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=96=87=E5=AD=97=20=E6=9D=A5=E5=9B=9E=E5=8F=8D=E5=A4=8D?= =?UTF-8?q?=E6=8B=96=E5=8A=A8=E6=89=8B=E6=9F=84=20=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E5=90=8E=E6=89=8B=E6=9F=84=E9=87=8D=E5=8F=A0=E5=90=8E=E7=BB=A7?= =?UTF-8?q?=E7=BB=AD=E6=9D=A5=E5=9B=9E=E6=8B=96=20=E6=96=87=E5=AD=97?= =?UTF-8?q?=E9=AB=98=E4=BA=AE=E7=9A=84=E9=83=A8=E5=88=86=E5=92=8C=E5=89=8D?= =?UTF-8?q?=E5=90=8E=E6=89=8B=E6=9F=84=E5=A4=84=E4=BA=8E=E5=A4=B1=E7=81=B5?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: jcg_814 --- ui/touch_selection/touch_selection_controller.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/touch_selection/touch_selection_controller.cc b/ui/touch_selection/touch_selection_controller.cc index 554cc6c010..28be0b2e41 100644 --- a/ui/touch_selection/touch_selection_controller.cc +++ b/ui/touch_selection/touch_selection_controller.cc @@ -103,7 +103,12 @@ void TouchSelectionController::OnSelectionBoundsChanged( end_.edge_end() == start.edge_start()) || (end_selection_handle_->IsActive() && end.edge_end() == start_.edge_start()); - +#ifdef OHOS_CLIPBOARD + if (!need_swap) { + need_swap = (end_ == end && end_selection_handle_->IsActive()) || + (start_ == start && start_selection_handle_->IsActive()); + } +#endif if (need_swap) start_selection_handle_.swap(end_selection_handle_); } -- Gitee