Skip to content

Commit

Permalink
🐛 Fix issue where switching tabs triggered reload timer
Browse files Browse the repository at this point in the history
  • Loading branch information
kierandrewett committed Dec 16, 2023
1 parent e2b446e commit 6aa5201
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion components/commands/content/reload-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ export class ReloadTabCommand extends TabCommand {

if (this.isLoading) {
this._clearReloadTimer();
} else if (webProgress.isTopLevel && !webProgress.isLoadingDocument) {
} else if (
request instanceof Ci.nsIRequest &&
webProgress.isTopLevel &&
!webProgress.isLoadingDocument
) {
if (this._reloadTimer) return;

this.disabled = true;
Expand Down
4 changes: 2 additions & 2 deletions third_party/dothq/gecko-types/lib/nsIRequest.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import { nsIJSIID } from "./nsIJSIID";
import { nsIURI } from "./nsIURI";

export enum TRRMode {
Expand All @@ -11,8 +12,7 @@ export enum TRRMode {
TRR_ONLY_MODE = 3
}

export interface nsIRequest {
name: string;
export interface nsIRequest extends nsIJSIID<"nsIRequest">, Omit<Function, "name"> {
isPending: boolean;
status: number;
cancel(status: number): void;
Expand Down

0 comments on commit 6aa5201

Please sign in to comment.