зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1556103 - Part 2. Long press doesn't show virtual keyboard. r=geckoview-reviewers,snorp
When long tapping on input element, the behavior of virtual keyboard is different of Chrome. Firefox opens virtual keyboard, but Chrome doesn't. So I would like to change to same behavior of Chrome. Also, after this fix, action bar (copy, paste and etc) won't be disappeared immediately after it appears by long tap. Before applying this fix, virtual keyboard is shown, then focused element is scrolled to center. So action bar may be disappeared. But after applying this fix, focused element isn't scrolled. So action bar keeps same position. Depends on D35991 Differential Revision: https://phabricator.services.mozilla.com/D35992 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8b306f551d
Коммит
3cc03057bd
|
@ -1531,8 +1531,11 @@ void GeckoEditableSupport::SetInputContext(const InputContext& aContext,
|
|||
void GeckoEditableSupport::NotifyIMEContext(const InputContext& aContext,
|
||||
const InputContextAction& aAction) {
|
||||
const bool inPrivateBrowsing = aContext.mInPrivateBrowsing;
|
||||
// isUserAction is used whether opening virtual keyboard. But long press
|
||||
// shouldn't open it.
|
||||
const bool isUserAction =
|
||||
aAction.IsHandlingUserInput() || aContext.mHasHandledUserInput;
|
||||
aAction.mCause != InputContextAction::CAUSE_LONGPRESS &&
|
||||
(aAction.IsHandlingUserInput() || aContext.mHasHandledUserInput);
|
||||
const int32_t flags =
|
||||
(inPrivateBrowsing ? EditableListener::IME_FLAG_PRIVATE_BROWSING : 0) |
|
||||
(isUserAction ? EditableListener::IME_FLAG_USER_ACTION : 0);
|
||||
|
|
Загрузка…
Ссылка в новой задаче