[Bug] Cmd+V does not paste into macOS Open/Save dialog (Go to Folder)
Description
On macOS, Cmd+V does not paste into native Open/Save dialogs opened by MarkText. A common case is the system Go to Folder sheet (Cmd+Shift+G) from File → Open Folder…: the clipboard path is not inserted.
Right-click → Paste in the same field works. Other native macOS apps paste with Cmd+V in the same dialog flow.
This appears to be caused by MarkText intercepting paste instead of using Electron's native macOS paste role:
- The Edit menu binds Paste to a custom
clickhandler that callswebContents.paste()on the MarkText window, rather thanrole: "paste". - Editor keybindings also register
Command+Vviaelectron-localshortcuton theBrowserWindow.
While a native open/save panel owns focus, Cmd+V is handled by MarkText and never reaches the dialog's first responder. The same class of bug was diagnosed in another Electron app: https://github.com/stablyai/orca/issues/12640
Steps to Reproduce
- Launch MarkText on macOS.
- Choose File → Open Folder… (native Open dialog appears).
- Press
Cmd+Shift+Gto open Go to Folder. - Copy any existing folder path to the clipboard (e.g.
/tmp). - Focus the Go to Folder text field and press
Cmd+V.
Expected Behavior
Cmd+V inserts the clipboard path into the Go to Folder field (same as Finder / other native apps). When a MarkText editor window is focused, paste should still go to the editor as today.
Actual Behavior
Cmd+V does nothing in the Go to Folder field (or paste is swallowed by the MarkText window). Right-click → Paste in that field works.
Screenshots / Logs
N/A. Easy to reproduce with the steps above; no crash or console error required.
Suggested direction (for maintainers): on macOS, prefer role: "paste" / Menu.sendActionToFirstResponder("paste:") when a native dialog owns focus, and avoid routing Cmd+V exclusively through BrowserWindow.webContents.paste() / window-local shortcuts while dialog.showOpenDialog / showSaveDialog is active.
Operating System
macOS
MarkText Version
0.19.1 (Electron 42.1.0)
OS Version
macOS 26.x (Darwin arm64)
Reproducibility
- I can reliably reproduce this issue
Source: marktext/marktext