#5582·marktext

[Bug] Cmd+V does not paste into macOS Open/Save dialog (Go to Folder)

Author: martinzh717Created Sep 29, 2026Updated Sep 29, 2026

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 click handler that calls webContents.paste() on the MarkText window, rather than role: "paste".
  • Editor keybindings also register Command+V via electron-localshortcut on the BrowserWindow.

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

  1. Launch MarkText on macOS.
  2. Choose File → Open Folder… (native Open dialog appears).
  3. Press Cmd+Shift+G to open Go to Folder.
  4. Copy any existing folder path to the clipboard (e.g. /tmp).
  5. 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