#if ENABLE(TIZEN_ISF_PORT)
, m_useInputMethod(false)
, m_state(ECORE_IMF_INPUT_PANEL_STATE_HIDE)
+ , m_inputPickerType(-1)
#endif
{
ASSERT(context);
void InputMethodContextEfl::updateTextInputState()
{
const EditorState& editor = m_viewImpl->page()->editorState();
+ if (editor.shouldIgnoreCompositionSelectionChange)
+ return;
- if (!editor.shouldIgnoreCompositionSelectionChange) {
- if (editor.isContentEditable && m_useInputMethod)
- showIMFContext(editor);
- else
- hideIMFContext();
- }
+ if (editor.isContentEditable && m_useInputMethod) {
+#if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
+ if (m_viewImpl->pageClient->isClipboardWindowOpened())
+ m_viewImpl->pageClient->closeClipboardWindow();
+#endif
+ showIMFContext(editor);
+ } else
+ hideIMFContext();
if (m_context)
ecore_imf_context_cursor_position_set(m_context.get(), editor.cursorPosition);
void InputMethodContextEfl::onFocusIn()
{
+ if (m_inputPickerType >= 0) {
+ showInputPicker(m_viewImpl->page()->editorState());
+ return;
+ }
+
if (!m_context || !m_focused)
return;
bool defaultKeypadEnabled = ewk_settings_default_keypad_enabled_get(settings);
#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
- if (editor.inputMethodHints == "date") {
- showInputPicker(EWK_INPUT_TYPE_DATE, editor);
- return;
- } else if (editor.inputMethodHints == "datetime") {
- showInputPicker(EWK_INPUT_TYPE_DATETIME, editor);
- return;
- } else if (editor.inputMethodHints == "datetime-local") {
- showInputPicker(EWK_INPUT_TYPE_DATETIMELOCAL, editor);
- return;
- } else if (editor.inputMethodHints == "month") {
- showInputPicker(EWK_INPUT_TYPE_MONTH, editor);
- return;
- } else if (editor.inputMethodHints == "time") {
- showInputPicker(EWK_INPUT_TYPE_TIME, editor);
- return;
- } else if (editor.inputMethodHints == "week") {
- showInputPicker(EWK_INPUT_TYPE_WEEK, editor);
+ if (editor.inputMethodHints == "date")
+ m_inputPickerType = EWK_INPUT_TYPE_DATE;
+ else if (editor.inputMethodHints == "datetime")
+ m_inputPickerType = EWK_INPUT_TYPE_DATETIME;
+ else if (editor.inputMethodHints == "datetime-local")
+ m_inputPickerType = EWK_INPUT_TYPE_DATETIMELOCAL;
+ else if (editor.inputMethodHints == "month")
+ m_inputPickerType = EWK_INPUT_TYPE_MONTH;
+ else if (editor.inputMethodHints == "time")
+ m_inputPickerType = EWK_INPUT_TYPE_TIME;
+ else if (editor.inputMethodHints == "week")
+ m_inputPickerType = EWK_INPUT_TYPE_WEEK;
+ else
+ m_inputPickerType = -1;
+
+ if (m_inputPickerType >= 0) {
+ showInputPicker(editor);
return;
}
#endif
#endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
-#if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
- if (m_viewImpl->pageClient->isClipboardWindowOpened()) {
- LOG(ISF, "[FAIL] Clipboard\n");
- return;
- }
-#endif
-
bool hasFocus = evas_object_focus_get(m_viewImpl->view());
if (!defaultKeypadEnabled) {
ewk_view_focused_node_adjust(m_viewImpl->view(), EINA_TRUE);
m_focused = true;
+ m_state = ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW;
}
void InputMethodContextEfl::hideIMFContext()
}
#endif
+ m_inputPickerType = -1;
+
if (!m_context || !m_focused)
return;
m_focused = false;
- if (ecore_imf_context_input_panel_state_get(m_context.get()) != ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+ if (ecore_imf_context_input_panel_state_get(m_context.get()) != ECORE_IMF_INPUT_PANEL_STATE_HIDE
+ && evas_object_focus_get(m_viewImpl->view())) {
ecore_imf_context_reset(m_context.get());
ecore_imf_context_input_panel_hide(m_context.get());
ecore_imf_context_focus_out(m_context.get());
}
#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
-void InputMethodContextEfl::showInputPicker(Ewk_Input_Type type, const EditorState& editorState)
+void InputMethodContextEfl::showInputPicker(const EditorState& editorState)
{
if (editorState.selectionIsRange || !evas_object_focus_get(m_viewImpl->view()))
return;
- ewkViewInputPickerRequest(m_viewImpl->view(), type, editorState.surroundingText);
+ ewkViewInputPickerRequest(m_viewImpl->view(), static_cast<Ewk_Input_Type>(m_inputPickerType), editorState.surroundingText);
+ m_inputPickerType = -1;
}
#endif