tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
79.49k stars 2.36k forks source link

[bug] [v2] undo and redo shortcuts don't work in popular editor on MacOS #10148

Open percy507 opened 4 days ago

percy507 commented 4 days ago

Describe the bug

In tauri v2-beta, the undo and redo shortcuts don't work in popular editor on MacOS. (Focus the editor, then press enter key, then undo, you will see the bug without any error message.)

I also test on windows 10, they work fine. Then I test on MacOS with lastest tauri v1, they also work fine.

ps: I notice this issue #9426, but it doesn't help for me.

Here is the test demo. https://github.com/percy507/test-tauri-v2/tree/undo-redo-donot-work-in-editor

# v2-beta on MacOS
textarea                works
contenteditable         works
the rest editors        doesn't work
image

Reproduction

https://github.com/percy507/test-tauri-v2/tree/undo-redo-donot-work-in-editor

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Mac OS 13.2.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.75.0 (82e1608df 2023-12-21)
    ✔ cargo: 1.75.0 (1d8b05cdd 2023-11-20)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.7.0
    - pnpm: 8.3.1
    - yarn: 1.22.21
    - npm: 10.1.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.22
    - tauri-build [RUST]: 2.0.0-beta.17
    - wry [RUST]: 0.40.1
    - tao [RUST]: 0.28.1
    - @tauri-apps/api [NPM]: 2.0.0-beta.13
    - @tauri-apps/cli [NPM]: 2.0.0-beta.20

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite

Stack trace

No response

Additional context

No response

pewsheen commented 2 days ago

Tauri with unstable feature enabled will create a webview as child and fall into #9426.