Markdown editor: in "Open as Preview", Find is unreachable until the preview is clicked, and the Edit > Find menu never works
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.134.0 (110a328ea54b42367b803ec53ee0bf52ef26b419, x64)
- OS Version: Windows 11 Pro, 10.0.26200.9168
Opening a markdown file with the "Open as Preview" button leaves the preview without keyboard focus, so Find cannot be opened from the keyboard until the preview is clicked. The Edit > Find menu item never opens the Find widget at all, whether or not the preview has been clicked.
Steps to Reproduce:
1. Open a `.md` file.
2. Click the "Open as Preview" button.
3. Click the Edit > Find menu item. Nothing happens.
4. Press Ctrl+F. Nothing happens.
5. Click anywhere inside the preview, then press Ctrl+F. The Find widget appears.
6. With the preview still focused, click the Edit > Find menu item again. Nothing happens.
Expected behavior: after step 2 the preview holds keyboard focus, so Ctrl+F opens the Find widget immediately, and the Edit > Find menu item opens the same Find widget at every point above.
Actual behavior: Ctrl+F only works after the extra click in step 5, and the Edit > Find menu item does nothing at any point, including once the Find widget is known to be reachable by keyboard.
These look like two separate defects that are worth tracking together. The Ctrl+F symptom is consistent with the preview not taking keyboard focus when it is opened, so the `Ctrl+F` keybinding has no matching focus context until a click supplies one. The Edit > Find symptom is not explained by focus, since it persists in step 6 when the preview is focused and Ctrl+F works. That suggests the menu item is bound to a command the markdown preview editor does not implement, rather than to whatever Ctrl+F resolves to in this editor.
Related but distinct: #328934 reports that the Find widget in this editor hides the Match Case, Whole Word and Regex options at narrow widths. That is a layout problem in a Find widget that does open; this report is about the widget being unreachable in the first place.
Contributor guide
Assessment
This issue has not been assessed yet.