зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1402461 - Improve user input detection for focus changes in Fennec r=jchen
Differential Revision: https://phabricator.services.mozilla.com/D94 MozReview-Commit-ID: 9VyoskwRrO1
This commit is contained in:
Родитель
9047c35a43
Коммит
59bfaa0f09
|
@ -12,6 +12,7 @@
|
|||
#include "nsIContent.h"
|
||||
#include "nsISelection.h"
|
||||
|
||||
#include "mozilla/EventStateManager.h"
|
||||
#include "mozilla/IMEStateManager.h"
|
||||
#include "mozilla/TextComposition.h"
|
||||
#include "mozilla/TextEventDispatcherListener.h"
|
||||
|
@ -1153,9 +1154,11 @@ GeckoEditableSupport::SetInputContext(const InputContext& aContext,
|
|||
aAction.mCause, aAction.mFocusChange);
|
||||
|
||||
mInputContext = aContext;
|
||||
const bool isUserAction = EventStateManager::IsHandlingUserInput();
|
||||
|
||||
if (mInputContext.mIMEState.mEnabled == IMEState::ENABLED &&
|
||||
aAction.UserMightRequestOpenVKB()) {
|
||||
isUserAction &&
|
||||
aAction.mFocusChange == InputContextAction::FOCUS_NOT_CHANGED) {
|
||||
// Don't reset keyboard when we should simply open the vkb
|
||||
mEditable->NotifyIME(GeckoEditableListener::NOTIFY_IME_OPEN_VKB);
|
||||
return;
|
||||
|
@ -1167,8 +1170,6 @@ GeckoEditableSupport::SetInputContext(const InputContext& aContext,
|
|||
mIMEUpdatingContext = true;
|
||||
|
||||
RefPtr<GeckoEditableSupport> self(this);
|
||||
bool isUserAction = aAction.IsUserAction();
|
||||
|
||||
nsAppShell::PostEvent([this, self, isUserAction] {
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче