On mobile, when context menu is shown, and user presses hardware back
key, browser opens previous site instead of closing menu.
This commit fixes this issue.
Issue-Id: CBBROWSER-76
Change-Id: Ic336dbd2ca63c847c87bc092b391af90e32437e2
webview->context_menu_.reset();
handled = true;
}
- if (webview->selection_controller_->IsAnyHandleVisible()){
+ if (webview->selection_controller_->IsAnyHandleVisible()) {
DVLOG(1) << "Clearing text selection due to back key press";
webview->ClearSelection();
handled = true;
}
+#ifndef OS_TIZEN_TV
+ if (!handled)
+ webview->GoBack();
+#endif
+ return EINA_TRUE;
}
- if (!handled)
- webview->rwhv()->HandleEvasEvent(event);
- return true;
+ webview->rwhv()->HandleEvasEvent(event);
+ return EINA_TRUE;
}
Eina_Bool EWebView::handleKeyUp(Ewk_View_Smart_Data* d, const Evas_Event_Key_Up* event) {