Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(801)

Unified Diff: Source/core/editing/FrameSelection.cpp

Issue 330613002: Copying text closes the keyboard and the text input gets unfocused, forcing virtual keyboard is get… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated code based on self review. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/editing/FrameSelection.cpp
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
index 16e620df97cae52317e1f1aee6263d23f48c64a3..50deb964fb161da3db43375bc9d1018d6ef7ca91 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -1440,6 +1440,12 @@ bool FrameSelection::isInPasswordField() const
return isHTMLInputElement(textControl) && toHTMLInputElement(textControl)->isPasswordField();
}
+bool FrameSelection::isInTextField() const
+{
+ HTMLTextFormControlElement* textControl = enclosingTextFormControl(start());
+ return isHTMLInputElement(textControl) && toHTMLInputElement(textControl)->isTextField();
+}
+
void FrameSelection::notifyAccessibilityForSelectionChange()
{
if (m_selection.start().isNotNull() && m_selection.end().isNotNull()) {

Powered by Google App Engine
This is Rietveld 408576698