scratchfoundation / scratch-desktop

Scratch 3.0 as a self-contained desktop application
BSD 3-Clause "New" or "Revised" License
352 stars 232 forks source link

right-click menu is missing from stage #141

Open cwillisf opened 4 years ago

cwillisf commented 4 years ago

Expected Behavior

Right-clicking on the stage should bring up a menu which includes "Save image as..." and "Copy image" as in a Chromium-based browser.

Actual Behavior

Right-clicking on the stage does nothing.

Steps to Reproduce

  1. Launch Scratch Desktop
  2. Right click on the stage
cwillisf commented 4 years ago

Note that this right-click menu is a built-in feature of the browser. It seems that Electron by default turns the menu off, but there may be a way to turn it back on.

cwillisf commented 4 years ago

Potentially relevant: https://github.com/sindresorhus/electron-context-menu

apple502j commented 4 years ago

Why do you rely on the browser's feature? Can't we have context menu our side and have stage download there, or put it in Edit/File menu dropdown?

cwillisf commented 4 years ago

We certainly could implement it ourselves, but if we can use Electron's (Chromium's) built-in functionality that would be even better.

What I meant above was that the right-click menu that you get on the stage when visiting scratch.mit.edu is a feature of the browser: it's default behavior on canvas elements in many browsers and we didn't do anything special to make that happen. It's not default behavior on canvas elements in Electron, though, so we'll need to decide how best to add or enable it.