Text in URL bar is dissapearing 21/77121/4
authorm.kawonczyk <m.kawonczyk@samsung.com>
Tue, 28 Jun 2016 15:09:28 +0000 (17:09 +0200)
committerHye Kyoung Hwang <cookie@samsung.com>
Thu, 30 Jun 2016 00:30:11 +0000 (17:30 -0700)
    [Issue]        http://suprem.sec.samsung.net/jira/browse/TSAM-5649
    [Problem]      Entry is clearing itself on unfocus. Rotating device
                   results in receiving virtualkeypad,state,off which
                   is unfocusing entry. In addition wrong event was
                   used - mouse,in instead of mouse,down. Mouse position
                   stayed in a same place after rotation, which called
                   mouse,in on a different evas.
    [Solution]     Change event from mouse,in to mouse,down. Remove
                   unfocusing entry on virtualkeypad,state,off as it
                   is not needed there.
    [Verify]       Open browser, type anything in urlbar. Rotate
                   device. Check if IME is still visible as well as if
                   text is visible.

Change-Id: Icaf08003c1b42c09d5d8b95f72569e832e206ef9

services/PlatformInputManager/PlatformInputManager.cpp
services/PlatformInputManager/PlatformInputManager.h
services/SimpleUI/SimpleUI.cpp
services/SimpleUI/SimpleUI.h
services/WebPageUI/WebPageUI.cpp

index fba393cedd52372d048600a41ef5e40fc91d7377..49126dcdfe5c7a6ac404ce2992271054171122ac 100644 (file)
@@ -125,7 +125,10 @@ Eina_Bool PlatformInputManager::__filter(void *data, void */*loop_data*/, int ty
             self->rightPressed();
         else if(!keyName.compare("KEY_ENTER"))
             self->enterPressed();
-#if !PROFILE_MOBILE
+#if PROFILE_MOBILE
+        else if(!keyName.compare("XF86Back"))
+            self->XF86BackPressed();
+#else
         else if(!keyName.compare("F11") || !keyName.compare("XF86Back"))
             self->backPressed();
         else if(!keyName.compare("XF86Red"))    // F4 - Red
index cb3a655b1a05150ce88f4eeba7db0dd0ecdf23aa..a2a8e10776bb73a18cfb65220aec48b2d7d1d203 100644 (file)
@@ -56,6 +56,7 @@ public:
     boost::signals2::signal<void ()> backPressed;
     boost::signals2::signal<void ()> escapePressed;
 #if PROFILE_MOBILE
+    boost::signals2::signal<void ()> XF86BackPressed;
     boost::signals2::signal<void ()> menuButtonPressed;
 #else
     boost::signals2::signal<void ()> redPressed;
index 51dfd639ef0e810732e97a91836e3f9d5c32e09b..5b0327a30479cadae74b72376c153923a08bded3 100644 (file)
@@ -613,6 +613,7 @@ void SimpleUI::connectModelSignals()
 #if PROFILE_MOBILE
     m_storageService->getSettingsStorage().setWebEngineSettingsParam.connect(boost::bind(&basic_webengine::AbstractWebEngine<Evas_Object>::setSettingsParam, m_webEngine.get(), _1, _2));
     m_platformInputManager->menuButtonPressed.connect(boost::bind(&SimpleUI::onMenuButtonPressed, this));
+    m_platformInputManager->XF86BackPressed.connect(boost::bind(&SimpleUI::onXF86BackPressed, this));
     m_webEngine->registerHWKeyCallback.connect(boost::bind(&SimpleUI::registerHWKeyCallback, this));
     m_webEngine->unregisterHWKeyCallback.connect(boost::bind(&SimpleUI::unregisterHWKeyCallback, this));
 #endif
@@ -938,9 +939,6 @@ void SimpleUI::onUrlIMEClosed(void* data, Evas_Object*, void*)
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     SimpleUI* self = reinterpret_cast<SimpleUI*>(data);
     self->setwvIMEStatus(false);
-#if PROFILE_MOBILE
-    self->m_webPageUI->setContentFocus();
-#endif
 }
 #endif
 
@@ -1001,9 +999,16 @@ void SimpleUI::setwvIMEStatus(bool status)
     m_wvIMEStatus = status;
 }
 
+void SimpleUI::onXF86BackPressed()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if (m_wvIMEStatus && m_webPageUI->getURIEntry().hasFocus())
+        m_webPageUI->getURIEntry().clearFocus();
+}
+
 void SimpleUI::onBackPressed()
 {
-    BROWSER_LOGD("[%s]", __func__);
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
 #if PROFILE_MOBILE
     if (evas_object_visible_get(m_findOnPageUI->getContent()))
         closeFindOnPageUI();
index 075dc59237d326033527d7af61e55ffe50b9b86f..532a2d9969d0dfc639803fb2c2e6152dc329de6a 100644 (file)
@@ -326,6 +326,7 @@ private:
     int tabsCount();
 
     void onReturnPressed(MenuButton *m);
+    void onXF86BackPressed();
     void onBackPressed();
 
     void searchWebPage(std::string &text, int flags);
index e95bf655adb5e6661240aeaa5b2272daabe8ff1e..7190498d0703b520a5447142943ba0d6c84ca906 100755 (executable)
@@ -203,7 +203,7 @@ void WebPageUI::setMainContent(Evas_Object* content)
     elm_gesture_layer_attach(m_gestureLayer, content);
 #endif
 #if PROFILE_MOBILE
-    evas_object_smart_callback_add(content, "mouse,in", _content_clicked, this);
+    evas_object_smart_callback_add(content, "mouse,down", _content_clicked, this);
 #endif
     evas_object_show(content);
 }