Bug 1240917 - Do not show caret in empty input on Fennec. r=roc

Per request in bug 1240917 comment 15, we decided not to show caret when
single press on an empty input. This effectively reverts the work in Bug
1230582.

--HG--
extra : commitid : IjKGpqAR6zP
extra : rebase_source : d476618b4f419cf2d96bb33264cfd8ccb6e3fa61
This commit is contained in:
Ting-Yu Lin 2016-02-02 14:32:31 +08:00
parent 73e999449b
commit 7d02ded5a1
2 changed files with 2 additions and 6 deletions

View File

@ -265,10 +265,7 @@ AccessibleCaretManager::UpdateCaretsForCursorMode(UpdateCaretsHint aHint)
case PositionChangedResult::Changed:
switch (aHint) {
case UpdateCaretsHint::Default:
// On Fennec, always show accessiblecaret even if the input is empty
// to make ActionBar visible.
if (sCaretsExtendedVisibility ||
HasNonEmptyTextContent(GetEditingHostForFrame(frame))) {
if (HasNonEmptyTextContent(GetEditingHostForFrame(frame))) {
mFirstCaret->SetAppearance(Appearance::Normal);
} else {
mFirstCaret->SetAppearance(Appearance::NormalNotShown);

View File

@ -252,8 +252,7 @@ protected:
static bool sSelectionBarEnabled;
// Android specific visibility extensions correct compatibility issues
// with caret-drag, tapping into empty inputs, and ActionBar visiblity
// during page scroll.
// with caret-drag and ActionBar visibility during page scroll.
static bool sCaretsExtendedVisibility;
// By default, javascript content selection changes closes AccessibleCarets and