scrollview: apply the scaling ratio to the soft keyboard
authorMinkyu Kang <mk7.kang@samsung.com>
Fri, 1 Feb 2013 06:36:39 +0000 (15:36 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Thu, 7 Feb 2013 05:53:01 +0000 (14:53 +0900)
Because of the Web UI FW set the viewport to "device-width",
the height of soft keyboard is different.
This patch apply the scaling ratio to the soft keyboard.

Change-Id: I7e31f7db2b5adfb60f86461862f7c0658404438c

src/widgets/common/js/jquery.mobile.tizen.scrollview.js

index 03cfc0c..73c9798 100644 (file)
                                                elem = $( input[i + 1] );
                                        }
 
-                                       elem_top = elem.offset().top;
+                                       elem_top = elem.offset().top + window.screenTop *
+                                               ( $( window ).width() / window.screen.availWidth );
                                        screen_h = $c.offset().top + $c.height() - elem.height();
 
                                        if ( self._softkeyboard ) {
                                }
 
                                self._softkeyboard = ( e.state === "on" ? true : false );
-                               self._softkeyboardHeight = e.height;
+                               self._softkeyboardHeight = e.height *
+                                               ( $( window ).width() / window.screen.availWidth );
                        });
 
                        $c.closest(".ui-page")