1. If IME is shown, context menu and handlers shouldn't be hidden by H/W back
key. Currently context menu and handlers are cleared regardless of IME state
becuase |SelectionControllerEfl::HideHandleAndContextMenu()| is called in
|RWHVEfl::ImeCompositionRangeChanged| which is called when IME is shown or
hidden. This patch removes it.
2. HW back key deletes selected text. |IMContextEfl::OnPreeditChanged| isn't
returned propery when buffer is empty.
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=15025
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=15060
Reviewed by: a1.gomes, djmix.kim, g.czajkowski
Change-Id: If85f59f0121cf36159e4b5d0ea9adda6a9df78d6
Signed-off-by: Sanghyup Lee <sh53.lee@samsung.com>
char* buffer = 0;
ecore_imf_context_preedit_string_get(context, &buffer, 0);
- if (!buffer)
- return;
+
+ // Upon the BACK HW key press on Mobile, the preedit changed
+ // registered callback is being called with an empty preedit string.
+ // This bubbles down to the engine through RWHVEfl::SetComposition
+ // and ends up deleting selected text, if any. Check here prevents this
+ // from happening.
+ if (!buffer || !strcmp(buffer, ""))
+ return;
utf8_key_ = buffer;
// Add empty commit to stop processing commits.
void RenderWidgetHostViewEfl::ImeCompositionRangeChanged(
const gfx::Range& range,
const std::vector<gfx::Rect>& character_bounds) {
-
- if (GetSelectionController())
- GetSelectionController()->HideHandleAndContextMenu();
+ NOTIMPLEMENTED();
}
void RenderWidgetHostViewEfl::FocusedNodeChanged(bool is_editable_node) {