Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Items automatically added to View menu on macOS #2804

Closed
probablykasper opened this issue Oct 26, 2021 · 4 comments · Fixed by #5399
Closed

Items automatically added to View menu on macOS #2804

probablykasper opened this issue Oct 26, 2021 · 4 comments · Fixed by #5399

Comments

@probablykasper
Copy link
Member

Describe the bug

When you have a View menu, these items are automatically added:

image

I initially thought macOS did this automatically (it does for Edit > Start Dictation and Edit > Emoji & Symbols), but apps like Discord don't have it.

To Reproduce

Create a menu called View:

.add_submenu(Submenu::new(
    "View",
    Menu::new(), // can be empty or not
  ));

Expected behavior

Either don't auto-add them, or provide a way to not auto-add them

Platform and Versions (required):

Details
Operating System - Mac OS, version 10.15.7 X64

Node.js environment
  Node.js - 14.18.1
  @tauri-apps/cli - 1.0.0-beta.10
  @tauri-apps/api - 1.0.0-beta.8

Global packages
  npm - 6.14.15
  yarn - 1.22.17

Rust environment
  rustc - 1.56.0
  cargo - 1.56.0

App directory structure
/node_modules
/.github
/src-tauri
/build
/.git
/assets
/src

App
  tauri.rs - 1.0.0-beta.8
  build-type - bundle
  CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
  distDir - ../build
  devPath - http://localhost:8000
  framework - Svelte
@lucasfernog
Copy link
Member

Seems like macOS does it automatically, I've been searching for a solution but couldn't find one. As a workaround you can set the submenu title to View with the trailing space.

Ref: https://stackoverflow.com/questions/64220162/how-to-enable-auto-generation-of-window-menuitems-e-g-tile-window-to-left-righ

@probablykasper
Copy link
Member Author

Maybe it's the allowsAutomaticWindowTabbing option as suggested here:
https://stackoverflow.com/a/65282964/6553404

@martpie
Copy link

martpie commented Jun 20, 2022

Mmmh, I'll try to look at how Electron is trying to avoid it because it's not happening there

@lucasfernog lucasfernog reopened this Jun 20, 2022
@lucasfernog
Copy link
Member

Tabbing is also related to #3912

lucasfernog added a commit that referenced this issue Oct 19, 2022
)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants