Scroll to focused editable node when ime change geometry.
authorKarol Furmaniak <k.furmaniak@samsung.com>
Thu, 26 Feb 2015 11:25:33 +0000 (12:25 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
[Problem]: Sometimes when changing orientation, page is not
scrolled to focused editable node.

[Solution]: Added scroll to focused editable node when
virtual keyboard change geometry to non zero size.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=11586
Reviewed by: DONGJUN KiM, Piotr Grad

Change-Id: I34a98fcf20764a6e306f01dfa2aba5735788745f
Signed-off-by: Karol Furmaniak <k.furmaniak@samsung.com>
tizen_src/impl/browser/renderer_host/im_context_efl.cc

index 0901c7f..0fe57d1 100644 (file)
@@ -449,6 +449,11 @@ void IMContextEfl::OnInputPanelGeometryChanged() {
   ecore_imf_context_input_panel_geometry_get(context_, &rect.x, &rect.y, &rect.w, &rect.h);
   view_->eweb_view()->SmartCallback<EWebViewCallbacks::IMEInputMethodChanged>().call(&rect);
 
+  // Scroll to focused editable node if virtual keyboard
+  // changed geometry
+  if (rect.w > 0 || rect.h > 0)
+    view_->eweb_view()->ScrollFocusedEditableNode();
+
   SetIMERect(gfx::Rect(rect.x, rect.y, rect.w, rect.h));
 }