Skip to content

Command W closed the Chrome tab without warning. It didn't close the file tab in Stackblitz editor #1745

@ADTC

Description

@ADTC

Describe the bug

As said on tin.

Link to the blitz that caused the error

https://stackblitz.com/edit/github-j37imzkt?file=src%2Fpages%2Findex.astro&on=stackblitz

Steps to reproduce

  1. Open Stackblitz in Chrome.
  2. Open some file tabs.
  3. Press Command - W (or Ctrl-W in Windows). Chrome tab closes.

Behavior is likely the same in other browsers.

Expected behavior

If it's possible to capture the keyboard shortcut, close the file tab in the Stackblitz editor. If there are no remaining file tabs, then a confirmation should ask if the Stackblitz editor should be close.

If it's not possible, then kindly have the "dirty state" flag enabled which forces the browser to confirm whether I accidentally press Command-W (macOS) or Ctrl-W (Windows) and it will close the tab.

Parity with Local

Screenshots

No response

Platform

Browser name  = Chrome
Full version  = 131.0.0.0
Major version = 131
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 132549304,
  "usedJSHeapSize": 101371368,
  "jsHeapSizeLimit": 4294705152
}
Hash = 7f809d15

Additional context

As this is a StackBlitz UI issue, "Parity with Local" is irrelevant here. If this is the wrong repo for UI issues, please help move it to the correct one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions