Bug 1169151 - Update carets after long tapping on empty input. r=mtseng
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 28 May 2015 02:33:00 +0800
changeset 246455 f2b4b7136b57b665106779af5e23972a0560e14e
parent 246454 0aac08013a2e3a88c791d0903fc622912b86f2ac
child 246456 97ab325b1cfbf822abba9348c1c5cf5330dd8337
push id28830
push usercbook@mozilla.com
push dateMon, 01 Jun 2015 13:02:44 +0000
treeherdermozilla-central@39c85ec2d644 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmtseng
bugs1169151
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1169151 - Update carets after long tapping on empty input. r=mtseng This fixed AccessibleCarets remain on the screen when long tapping on an empty input.
layout/base/AccessibleCaretManager.cpp
--- a/layout/base/AccessibleCaretManager.cpp
+++ b/layout/base/AccessibleCaretManager.cpp
@@ -345,16 +345,17 @@ AccessibleCaretManager::SelectWordOrShor
 
   nsIContent* editingHost = ptFrame->GetContent()->GetEditingHost();
   if (ChangeFocus(ptFrame) &&
       (editingHost && !nsContentUtils::HasNonEmptyTextContent(
                          editingHost, nsContentUtils::eRecurseIntoChildren))) {
     // Content is empty. No need to select word.
     AC_LOG("%s, Cannot select word bacause content is empty", __FUNCTION__);
     DispatchCaretStateChangedEvent(CaretChangedReason::Longpressonemptycontent);
+    UpdateCarets();
     return NS_OK;
   }
 
   nsresult rv = SelectWord(ptFrame, ptInFrame);
   UpdateCarets();
   return rv;
 }