Skip to content

Firefox window/tab is closed when reloading source code #1486

Open
@slhck

Description

@slhck

Is this a feature request or a bug?

Both, I guess?

What is the current behavior?

  • Run a web extension using web-ext run
  • Open a source file (e.g. HTML) belonging to the web extension in one tab
  • Modify the underlying source code and save
  • The tab with the open file closes, along with it the entire Firefox window

This is quite frustrating when, e.g., editing a complex HTML layout. Every time the layout is saved, the tab is closed. If it is the last tab, the entire Firefox window disappears (under macOS, at least). In order to get back to the HTML file I was editing, I have to open a new tab and copy-paste the URL I was previously editing, or find it in the history.

What is the expected or desired behavior?

When opening one or more tabs, and saving a source file of the extension, the currently open tab(s) should not close, but instead remain open and get reloaded.

Particularly, when only one tab is open, reloading the source code should not close the Firefox window.

This behavior may not be wanted, so a command line flag or option to prevent this kind of reloading would also come in handy. Note that I am not talking about --no-reload, as the code should be reloaded, but it's the tab(s) that should not be closed.

Version information (for bug reports)

  • Firefox version: 64.0
  • Your OS and version: macOS 10.13
  • Paste the output of these commands:
$  node --version && npm --version && web-ext --version
v11.5.0
6.4.1
2.9.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions