Backed out 3 changesets (bug 1712724) for causing mochitests without e10s failures in test_focus.xhtml
CLOSED TREE Backed out changeset 61d8ca98120b (bug 1712724) Backed out changeset 46b1d60b6b6b (bug 1712724) Backed out changeset 36504d508b34 (bug 1712724)
This commit is contained in:
@@ -3739,19 +3739,16 @@ nsresult HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
|
||||
// for text and password fields when the field was focused by the
|
||||
// keyboard or a navigation, the platform allows it, and it wasn't
|
||||
// just because we raised a window.
|
||||
//
|
||||
// While it'd usually make sense, we don't do this for JS callers
|
||||
// because it causes some compat issues, see bug 1712724 for example.
|
||||
nsFocusManager* fm = nsFocusManager::GetFocusManager();
|
||||
if (fm && IsSingleLineTextControl(false) &&
|
||||
!aVisitor.mEvent->AsFocusEvent()->mFromRaise &&
|
||||
SelectTextFieldOnFocus()) {
|
||||
if (Document* document = GetComposedDoc()) {
|
||||
Document* document = GetComposedDoc();
|
||||
if (document) {
|
||||
uint32_t lastFocusMethod;
|
||||
fm->GetLastFocusMethod(document->GetWindow(), &lastFocusMethod);
|
||||
if (lastFocusMethod & (nsIFocusManager::FLAG_BYKEY |
|
||||
nsIFocusManager::FLAG_BYMOVEFOCUS) &&
|
||||
!(lastFocusMethod & nsIFocusManager::FLAG_BYJS)) {
|
||||
nsIFocusManager::FLAG_BYMOVEFOCUS)) {
|
||||
RefPtr<nsPresContext> presContext =
|
||||
GetPresContext(eForComposedDoc);
|
||||
DispatchSelectEvent(presContext);
|
||||
|
||||
Reference in New Issue
Block a user