diff options
-rw-r--r-- | WebCore/html/HTMLInputElement.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp index 88e14fd..59e4e2f 100644 --- a/WebCore/html/HTMLInputElement.cpp +++ b/WebCore/html/HTMLInputElement.cpp @@ -1113,16 +1113,12 @@ void HTMLInputElement::setValue(const String& value) if (isTextField()) { unsigned max = m_data.value().length(); - if (document()->focusedNode() == this) #ifdef ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS - { - // Make sure our UI side textfield changes to match the RenderTextControl - android::WebViewCore::getWebViewCore(document()->view())->updateTextfield(this, false, value); + // Make sure our UI side textfield changes to match the RenderTextControl + android::WebViewCore::getWebViewCore(document()->view())->updateTextfield(this, false, value); #endif + if (document()->focusedNode() == this) InputElement::updateSelectionRange(this, this, max, max); -#ifdef ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS - } -#endif else cacheSelection(max, max); } |