richard pushed to branch base-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
3d78c742 by Henry Wilkes at 2023-10-11T18:30:21+00:00
fixup! Bug 41454: Move focus after calling openPreferences for a sub-category.
Bug 42167: Make the auto-focus more reliable.
No longer use the setTimeout to wait a loop, but instead wait for the
"load" event.
- - - - -
1 changed file:
- browser/components/preferences/preferences.js
Changes:
=====================================
browser/components/preferences/preferences.js
=====================================
@@ -482,14 +482,23 @@ async function scrollAndHighlight(subcategory, category) {
// We assign a tabindex=-1 to the element so that we can focus it. This allows
// us to move screen reader's focus to an arbitrary position on the page.
- // See tor-browser#41454 and bug 1799153.
- element.setAttribute("tabindex", "-1");
- // The element is not always immediately focusable, so we wait until the next
- // loop.
- setTimeout(() => {
+ // See tor-browser#41454 and mozilla bug 1799153.
+ const doFocus = () => {
+ element.setAttribute("tabindex", "-1");
Services.focus.setFocus(element, Services.focus.FLAG_NOSCROLL);
+ // Immediately remove again now that it has focus.
element.removeAttribute("tabindex");
- });
+ };
+ // The element is not always immediately focusable, so we wait until document
+ // load.
+ if (document.readyState === "complete") {
+ doFocus();
+ } else {
+ // Wait until document load to move focus.
+ // NOTE: This should be called after DOMContentLoaded, where the searchInput
+ // is focused.
+ window.addEventListener("load", doFocus, { once: true });
+ }
scrollContentTo(header);
element.classList.add("spotlight");
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/3d78c74…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/3d78c74…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch tor-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
00e9622f by Henry Wilkes at 2023-10-11T11:24:18+01:00
fixup! Bug 41454: Move focus after calling openPreferences for a sub-category.
Bug 42167: Make the auto-focus more reliable.
No longer use the setTimeout to wait a loop, but instead wait for the
"load" event.
- - - - -
1 changed file:
- browser/components/preferences/preferences.js
Changes:
=====================================
browser/components/preferences/preferences.js
=====================================
@@ -491,14 +491,23 @@ async function scrollAndHighlight(subcategory, category) {
// We assign a tabindex=-1 to the element so that we can focus it. This allows
// us to move screen reader's focus to an arbitrary position on the page.
- // See tor-browser#41454 and bug 1799153.
- element.setAttribute("tabindex", "-1");
- // The element is not always immediately focusable, so we wait until the next
- // loop.
- setTimeout(() => {
+ // See tor-browser#41454 and mozilla bug 1799153.
+ const doFocus = () => {
+ element.setAttribute("tabindex", "-1");
Services.focus.setFocus(element, Services.focus.FLAG_NOSCROLL);
+ // Immediately remove again now that it has focus.
element.removeAttribute("tabindex");
- });
+ };
+ // The element is not always immediately focusable, so we wait until document
+ // load.
+ if (document.readyState === "complete") {
+ doFocus();
+ } else {
+ // Wait until document load to move focus.
+ // NOTE: This should be called after DOMContentLoaded, where the searchInput
+ // is focused.
+ window.addEventListener("load", doFocus, { once: true });
+ }
scrollContentTo(header);
element.classList.add("spotlight");
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/00e9622…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/00e9622…
You're receiving this email because of your account on gitlab.torproject.org.
richard pushed to branch tor-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
c02fa5a8 by hackademix at 2023-10-10T16:58:37+00:00
fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
Bug 41766: Sanitize about:torconnect redirects.
- - - - -
1 changed file:
- browser/components/torconnect/content/aboutTorConnect.js
Changes:
=====================================
browser/components/torconnect/content/aboutTorConnect.js
=====================================
@@ -822,15 +822,21 @@ class AboutTorConnect {
}
async init() {
+ // if the user gets here manually or via the button in the urlbar
+ // then we will redirect to about:tor
+ this.redirect = "about:tor";
+
// see if a user has a final destination after bootstrapping
let params = new URLSearchParams(new URL(document.location.href).search);
if (params.has("redirect")) {
- const encodedRedirect = params.get("redirect");
- this.redirect = decodeURIComponent(encodedRedirect);
- } else {
- // if the user gets here manually or via the button in the urlbar
- // then we will redirect to about:tor
- this.redirect = "about:tor";
+ try {
+ const redirect = new URL(decodeURIComponent(params.get("redirect")));
+ if (/^(?:https?|about):$/.test(redirect.protocol)) {
+ this.redirect = redirect.href;
+ }
+ } catch (e) {
+ console.error(e, `Invalid redirect URL "${params.get("redirect")}"!`);
+ }
}
let args = await RPMSendQuery("torconnect:get-init-args");
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c02fa5a…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c02fa5a…
You're receiving this email because of your account on gitlab.torproject.org.
Dan Ballard deleted branch bug_42074 at The Tor Project / Applications / firefox-android
--
You're receiving this email because of your account on gitlab.torproject.org.