macro(LoadRemoteImages, loadRemoteImages, Bool, bool, true) \
macro(LinkEffectEnabled, linkEffectEnabled, Bool, bool, true) \
macro(EnableDefaultKeypad, defaultKeypadEnabled, Bool, bool, true) \
+ macro(UsesKeypadWithoutUserAction, usesKeypadWithoutUserAction, Bool, bool, true) \
macro(InteractiveFormValidationEnabled, interactiveFormValidationEnabled, Bool, bool, true) \
macro(GeolocationEnabled, geolocationEnabled, Bool, bool, true) \
macro(TextZoomEnabled, textZoomEnabled, Bool, bool, false) \
macro(LoadRemoteImages, loadRemoteImages, Bool, bool, true) \
macro(LinkEffectEnabled, linkEffectEnabled, Bool, bool, true) \
macro(EnableDefaultKeypad, defaultKeypadEnabled, Bool, bool, true) \
+ macro(UsesKeypadWithoutUserAction, usesKeypadWithoutUserAction, Bool, bool, true) \
macro(InteractiveFormValidationEnabled, interactiveFormValidationEnabled, Bool, bool, true) \
macro(GeolocationEnabled, geolocationEnabled, Bool, bool, true) \
macro(TextZoomEnabled, textZoomEnabled, Bool, bool, false) \
return settings->preferences()->defaultKeypadEnabled();
}
+
+Eina_Bool ewk_settings_uses_keypad_without_user_action_set(Ewk_Settings* settings, Eina_Bool use)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+
+ settings->preferences()->setUsesKeypadWithoutUserAction(use);
+
+ return true;
+}
+
+Eina_Bool ewk_settings_uses_keypad_without_user_action_get(const Ewk_Settings* settings)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(settings, true);
+
+ return settings->preferences()->usesKeypadWithoutUserAction();
+}
#endif
Eina_Bool ewk_settings_frame_flattening_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
* @return @c EINA_TRUE on enable or @c EINA_FALSE on disable
*/
EAPI Eina_Bool ewk_settings_default_keypad_enabled_get(const Ewk_Settings *settings);
+
+/**
+ * Requests to set using keypad without user action (default value : true)
+ *
+ * @param settings settings object using keypad without user action
+ * @param enable @c EINA_TRUE to use without user action @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_uses_keypad_without_user_action_set(Ewk_Settings *settings, Eina_Bool use);
+
+/**
+ * Returns using keypad without user action
+ *
+ * @param settings settings object using keypad without user action
+ * @param settings settings object to query using keypad without user action
+ *
+ * @return @c EINA_TRUE on enable or @c EINA_FALSE on disable
+ */
+EAPI Eina_Bool ewk_settings_uses_keypad_without_user_action_get(const Ewk_Settings *settings);
// #endif
/**
void InputMethodContextEfl::showIMFContext(const EditorState& editor)
{
- if (!editor.isTapEventHandling || (isShow() && m_contextID == editor.inputMethodContextID))
- return;
-
Ewk_Settings* settings = ewk_view_settings_get(m_viewImpl->view());
- bool defaultKeypadEnabled = ewk_settings_default_keypad_enabled_get(settings);
+ if (!editor.isTapEventHandling) {
+ if (!ewk_settings_uses_keypad_without_user_action_get(settings) || (m_focused && m_contextID == editor.inputMethodContextID))
+ return;
+ }
+
+ m_focused = true;
#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
if (editor.inputMethodHints == "date")
if (m_inputPickerType >= 0) {
showInputPicker(editor);
+ revertIMFContext();
+ m_contextID = editor.inputMethodContextID;
+
return;
}
else
ewkViewDataListShowRequest(m_viewImpl->view(), EWK_INPUT_TYPE_TEXT, optionList);
+ revertIMFContext();
+ m_contextID = editor.inputMethodContextID;
+
return;
}
#endif
bool hasFocus = evas_object_focus_get(m_viewImpl->view());
- if (!defaultKeypadEnabled) {
+ if (!ewk_settings_default_keypad_enabled_get(settings)) {
if (hasFocus) {
Eina_Rectangle dummyRectForCustomKeypadCallback;
memset(&dummyRectForCustomKeypadCallback, 0, sizeof(Eina_Rectangle));
if (!m_context)
return;
- if (!hasFocus) {
- m_focused = true;
+ if (!hasFocus)
return;
- }
#if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
if (m_viewImpl->pageClient->isClipboardWindowOpened())
// input field zoom for external keyboard
ewk_view_focused_node_adjust(m_viewImpl->view(), EINA_TRUE);
- m_focused = true;
-
setKeyboardMode(true);
}
if (!m_context || !m_focused)
return;
- if (m_viewImpl->page()->editorState().hasComposition)
- m_viewImpl->page()->cancelComposition();
-
- m_focused = false;
-
if (ecore_imf_context_input_panel_state_get(m_context.get()) != ECORE_IMF_INPUT_PANEL_STATE_HIDE
&& evas_object_focus_get(m_viewImpl->view())) {
resetIMFContext();
setKeyboardMode(false);
+ m_focused = false;
revertIMFContext();
}