diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index 66ebdcb15cfc..991edefb53a4 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -2716,7 +2716,8 @@ nsDOMWindowUtils::ZoomToFocusedInput() while (currentFrame) { if (currentFrame == rootFrame) { break; - } else if (currentFrame == scrolledFrame) { + } + if (currentFrame == scrolledFrame) { // we are in the rootScrollFrame so this element is not fixed isFixedPos = false; break; diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 5a8abf510b03..86408a400c92 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -10757,7 +10757,9 @@ void nsGlobalWindow::SetIsBackground(bool aIsBackground) inner->StopGamepadHaptics(); } return; - } else if (inner) { + } + + if (inner) { inner->SyncGamepadState(); } }