tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 97a5d86d27b010bd9c943ec2887a17d812df4d24
parent bb27cf41370349dc619fdf7f97b3c7799503a9d6
Author: Norisz Fay <nfay@mozilla.com>
Date:   Fri, 24 Oct 2025 07:22:12 +0300

Revert "Bug 1658511 - added eConsumeNoDefault to fix double submission bug on enter and added/tested tests r=masayuki" for causing bc failures on browser_search_userEngineDialog.js

This reverts commit cc67c80b2a4435348b4ce091845697cab9741334.

Diffstat:
Mdom/html/HTMLInputElement.cpp | 1-
Dtesting/web-platform/tests/html/semantics/forms/the-input-element/keypress-link-trigger.tentative.html | 48------------------------------------------------
2 files changed, 0 insertions(+), 49 deletions(-)

diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp @@ -3906,7 +3906,6 @@ nsresult HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor) { } if (aVisitor.mPresContext) { - aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault; MaybeSubmitForm(aVisitor.mPresContext); } } diff --git a/testing/web-platform/tests/html/semantics/forms/the-input-element/keypress-link-trigger.tentative.html b/testing/web-platform/tests/html/semantics/forms/the-input-element/keypress-link-trigger.tentative.html @@ -1,48 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"> -<title>Do not trigger parent link when typing `Enter` in a single line text control</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/testdriver.js"></script> -<script src="/resources/testdriver-actions.js"></script> -<script src="/resources/testdriver-vendor.js"></script> -<script> -"use strict"; - -addEventListener("load", () => { - promise_test(async () => { - const form = document.querySelector("form"); - let submitted = false; - form.addEventListener("submit", event => { - submitted = true; - event.preventDefault(); - }); - const textControl = document.querySelector("input[type=text]"); - textControl.focus(); - // typing `Enter` to submit the form - await new test_driver.Actions() - .keyDown("\uE007") - .keyUp("\uE007") - .send(); - assert_true(submitted, "Typing `Enter` should've caused submitting the form"); - assert_equals( - document.querySelector("span:target"), - null, - "The parent link should not be performed by typing `Enter` to submit the form" - ); - }); -}, {once: true}); -</script> -</head> -<body> - <form action="#submit"> - <a href="#anchor"> - <input type="text"> - <input type="submit"> - </a> - </form> - <span id="anchor">targeted if the link is performed</span> -</body> -</html>