diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp index 84496e3f668e..df65559a6640 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp @@ -7664,57 +7664,12 @@ nsresult PresShell::EventHandler::HandleEventInternal( case eKeyPress: case eKeyDown: case eKeyUp: { - Document* doc = mPresShell->GetCurrentEventContent() - ? mPresShell->mCurrentEventContent->OwnerDoc() - : nullptr; - auto keyCode = aEvent->AsKeyboardEvent()->mKeyCode; - if (keyCode == NS_VK_ESCAPE) { - Document* root = nsContentUtils::GetRootDocument(doc); - if (root && root->GetFullscreenElement()) { - // Prevent default action on ESC key press when exiting - // DOM fullscreen mode. This prevents the browser ESC key - // handler from stopping all loads in the document, which - // would cause