From: Sungmin Kwak Date: Fri, 3 Mar 2017 05:45:51 +0000 (+0900) Subject: Fix Remote Input bug in browser address text entry X-Git-Tag: accepted/tizen/3.0/common/20170309.110327~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F72%2F117172%2F2;p=platform%2Fcore%2Fuifw%2Fisf.git Fix Remote Input bug in browser address text entry The values of cursor_pos and surrounding_text are not correct. It's better to delete the surrounding text with maximum offset and length. Change-Id: I85a233daeca6514819ebbcf384550e4cd381f725 --- diff --git a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp index fa1a4a1..3291973 100644 --- a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp +++ b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp @@ -2429,7 +2429,7 @@ panel_slot_commit_string (int context, const WideString &wstr, bool remote_mode) check_input_resource (ic, INPUT_RESOURCE_REMOTE); if (ic->impl->panel_layout == ECORE_IMF_INPUT_PANEL_LAYOUT_URL) - wsc_context_delete_surrounding (ic, -ic->impl->cursor_pos, ic->impl->surrounding_text.length ()); + wsc_context_delete_surrounding (ic, INT_MIN/2, INT_MAX); wsc_context_commit_string (ic, utf8_wcstombs (wstr).c_str ()); ic->impl->need_commit_preedit = false; @@ -2508,7 +2508,7 @@ panel_slot_update_preedit_string (int context, const WideString str, const WideS ic->impl->preedit_caret = str.length (); if (ic->impl->panel_layout == ECORE_IMF_INPUT_PANEL_LAYOUT_URL) - wsc_context_delete_surrounding (ic, -ic->impl->cursor_pos, ic->impl->surrounding_text.length ()); + wsc_context_delete_surrounding (ic, INT_MIN/2, INT_MAX); wsc_context_send_preedit_string (ic); } else {