Skip to content

Search in markdown preview panel not working in current main branch local build #222244

Open

Description

Does this issue occur when all extensions are disabled?: Yes

Type: Bug

I recently build vscode on local with following configuration and last commit being 61b242c .

Version: 1.92.0
Commit: Unknown
Date: Unknown
Electron: 30.1.2
ElectronBuildId: undefined
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.5.0

I found that the search functionality is not working for markdown preview. Seems like a recently introduced issue as when I tried to perform the search operation in stable release I was able to search across markdown preview.

Steps to Reproduce:

  1. Preview a Markdown file
  2. Search for any keyword present in markdown file.
  3. You will see that it won't show results.

This bug could be pushed with next release and can cause issues with upcoming stable releases.

PFA: POC video for the issue.

vscode_find_issue.mp4

Would be great if Matt Bierner (@mjbvz) , you can shed some light here.

Activity

  1. dangerman commented on Jul 20, 2024

    @dangerman
    Contributor

    When trying to search in a Markdown Preview whilst debugging, the code does hit WebViewMainService.findInFrame():

    public async findInFrame(windowId: WebviewWindowId, frameName: string, text: string, options: { findNext?: boolean; forward?: boolean }): Promise<void> {
    const initialFrame = this.getFrameByName(windowId, frameName);
    type WebFrameMainWithFindSupport = WebFrameMain & {
    findInFrame?(text: string, findOptions: FindInFrameOptions): void;
    on(event: 'found-in-frame', listener: Function): WebFrameMain;
    removeListener(event: 'found-in-frame', listener: Function): WebFrameMain;
    };
    const frame = initialFrame as unknown as WebFrameMainWithFindSupport;
    if (typeof frame.findInFrame === 'function') {

    However, frame.findInFrame is undefined so it just skips the rest of the function - and this appears to be why it's not working.

    Now, according to this issue #201176 Microsoft uses a custom build of electron (from https://github.com/microsoft/vscode-electron-prebuilt that is not publicly accessible) for VS Code releases, with a WebFrameMain.FindInFrame() implementation, so searching works.

    The intention seems to be that changes are gradually upstreamed into the main electron repo, but unfortunately the PR for the FindInFrame stuff is Closed for the time being: electron/electron#28274

    Perhaps if we're able to merge the branch from that PR into an updated local build of electron, then we could use it with our vscode for debugging? 🤔

  2. added
    bug
    upstream
    webview
    electron
    on Dec 13, 2024
  3. rzhao271 commented on Dec 13, 2024

    @rzhao271
    Collaborator

    Manav Agarwal (@manav014) are you still able to reproduce the issue on VS Code 1.96?

  4. added
    info-needed
    on Dec 13, 2024
  5. removed
    info-needed
    on Dec 16, 2024
  6. deepak1556 commented on Dec 16, 2024

    @deepak1556
    Collaborator

    Raymond Zhao (@rzhao271) the api is not available in OSS builds

    Anees Ahee (@dangerman) yeah we need to revisit upstreaming the change

  7. KB-Q commented on May 12, 2026

    @KB-Q

    any update on this issue?

  8. karlkaspar commented on Jun 19, 2026

    @karlkaspar

    Still broken.... yay microsoft

  9. tredondo commented on Jul 21, 2026

    @tredondo

    Is this for real? After TWO YEARS you still can't search in rendered Markdown?!

    Microsoft whatever, but only FOUR upvotes before I added mine?!

  10. MarkJeronimus commented on Aug 4, 2026

    @MarkJeronimus

    I switched to IntelliJ IDEA for MD. You may need some additional plugins to get close to what VS ships out of the box. So far I found you need Mermaid (for in-line diagrams).

  11. mmahlies commented on Oct 22, 2026

    @mmahlies

    For some reason, I was able to use search feature in the Preview to the slide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugelectronupstreamwebview

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions