tor-browser

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

commit 744fabac3f89ea36f26f51086c56ef5891b1f1c9
parent 0c22beffb811e325873bfaece08fb3fd0bafebae
Author: Sarah Chung <sachung@mozilla.com>
Date:   Tue, 28 Oct 2025 14:29:25 +0000

Bug 1995928 - Prevents spotlight from closing if enter is pressed while file path is focused r=kpatenio,emcminn

Differential Revision: https://phabricator.services.mozilla.com/D270245

Diffstat:
Mbrowser/components/backup/content/turn-on-scheduled-backups.mjs | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/browser/components/backup/content/turn-on-scheduled-backups.mjs b/browser/components/backup/content/turn-on-scheduled-backups.mjs @@ -134,6 +134,9 @@ export default class TurnOnScheduledBackups extends MozLitElement { // listen to events from <password-validation-inputs> this.addEventListener("ValidPasswordsDetected", this); this.addEventListener("InvalidPasswordsDetected", this); + + // listens to keydown events + this.addEventListener("keydown", this); } handleEvent(event) { @@ -149,6 +152,15 @@ export default class TurnOnScheduledBackups extends MozLitElement { } else if (event.type == "InvalidPasswordsDetected") { this._passwordsMatch = false; this._inputPassValue = ""; + } else if (event.type == "keydown") { + if ( + event.key === "Enter" && + (event.originalTarget.id == + "backup-location-filepicker-input-default" || + event.originalTarget.id == "backup-location-filepicker-input-custom") + ) { + event.preventDefault(); + } } }