Commit fe4fe5a2 authored by henry's avatar henry Committed by morgan
Browse files

fixup! TB 27476: Implement about:torconnect captive portal within Tor Browser

TB 45236: Drop the wrapping <form> element.

Also fix the `for` attribute to point to the `<select>` element.
parent 9250f769
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -112,12 +112,8 @@ body {
  color: var(--text-color-error);
}

form#locationDropdown {
#regions-select {
  width: 240px;
}

form#locationDropdown select {
  width: 100%;
  margin: 0;
  font-weight: var(--font-weight-bold);
}
+2 −4
Original line number Diff line number Diff line
@@ -168,14 +168,12 @@
        <button id="configureButton" hidden="true"></button>
        <button id="cancelButton" hidden="true"></button>
        <button id="connectButton" hidden="true" class="tor-button"></button>
        <label id="locationDropdownLabel" for="countries"></label>
        <form id="locationDropdown" hidden="true">
          <select id="regions-select">
        <label id="locationDropdownLabel" for="regions-select"></label>
        <select id="regions-select" hidden="hidden">
          <option id="first-region-option"></option>
          <optgroup id="frequent-regions-option-group"></optgroup>
          <optgroup id="full-regions-option-group"></optgroup>
        </select>
        </form>
        <button id="tryBridgeButton" hidden="true" class="tor-button"></button>
      </div>
    </div>
+3 −7
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ class AboutTorConnect {
      connect: "button#connectButton",
      tryBridge: "button#tryBridgeButton",
      locationDropdownLabel: "#locationDropdownLabel",
      locationDropdown: "form#locationDropdown",
      locationDropdownSelect: "#regions-select",
    },
  });
@@ -112,9 +111,6 @@ class AboutTorConnect {
    locationDropdownLabel: document.querySelector(
      this.selectors.buttons.locationDropdownLabel
    ),
    locationDropdown: document.querySelector(
      this.selectors.buttons.locationDropdown
    ),
    locationDropdownSelect: document.querySelector(
      this.selectors.buttons.locationDropdownSelect
    ),
@@ -213,7 +209,7 @@ class AboutTorConnect {
    this.hide(this.elements.cancelButton);
    this.hide(this.elements.connectButton);
    this.hide(this.elements.locationDropdownLabel);
    this.hide(this.elements.locationDropdown);
    this.hide(this.elements.locationDropdownSelect);
    this.hide(this.elements.tryBridgeButton);
  }

@@ -933,7 +929,7 @@ class AboutTorConnect {
    this.populateDelayedRegionOptions();

    this.show(this.elements.locationDropdownLabel);
    this.show(this.elements.locationDropdown);
    this.show(this.elements.locationDropdownSelect);
    this.elements.locationDropdownLabel.classList.toggle("error", !isChoose);
    this.show(this.elements.tryBridgeButton, true);
    if (buttonLabel !== undefined) {
@@ -1102,7 +1098,7 @@ class AboutTorConnect {
    RPMAddMessageListener("torconnect:region-names-change", () => {
      // Reset the regions list.
      this.regions = null;
      if (!this.elements.locationDropdown.hidden) {
      if (!this.elements.locationDropdownSelect.hidden) {
        // Re-populate immediately.
        this.populateDelayedRegionOptions();
      }