From 9146f1bf08e13a958d3ae21cab614c3446875ef2 Mon Sep 17 00:00:00 2001 From: fangfengrong Date: Thu, 9 May 2024 11:43:36 +0800 Subject: [PATCH] [M120 Migration][VD] Reset ime context when mouse click or touch on editable node When mouse click or touch on editable node(the IME status is focus in), need reset ime context, to commit previous preedit text, or else will cause the new input text been inputed on the last position, not on the mouse or touch moved position. refer: https://review.tizen.org/gerrit/#/c/294848 Change-Id: I48fd54eea1ee887f8ca551ca0dd2f8e7f03b4962 Signed-off-by: fangfengrong --- .../ui/ozone/platform/efl/efl_event_handler.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.cc b/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.cc index e37b2ce5ce34..2e04f4148776 100644 --- a/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.cc +++ b/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.cc @@ -543,6 +543,14 @@ void EflEventHandler::OnMouseDown(void* data, thiz->window_->UpdateFocus(true); +#if BUILDFLAG(IS_TIZEN_TV) + // when mouse click or touch on editable node(the IME status is focus in), + // need reset ime context, to commit previous preedit text. + auto im_context_efl = thiz->GetIMContextEfl(); + if (im_context_efl && im_context_efl->IsFocused()) + im_context_efl->CancelComposition(); +#endif + if (thiz->GetTouchEventsEnabled(ev)) { thiz->ProcessTouchEvents(ev->timestamp, false); } else { -- 2.34.1