Find widget and clipboard commands within webviews don't work; cannot search WebviewPanel
with enableFindWidget: true
; can't cut, copy or paste
#1860
Labels
bug
Something isn't working
Describe the bug
Extensions can contribute custom editors, etc. using
WebviewPanel
. When one is created,WebviewPanelOptions
can haveenableFindWidget: true
, which enables a find widget on the webview that can be used with CtrlF, just like in any browser.In MS VSCode, it works as expected, even highlighting occurrences and everything.
In Codium, the find widget opens, but it doesn't work at all.
This is a problem, as extensions can often use webviews to display complex webpages, e.g. documentation; where often the user needs to be able to search for text. Forcing extension authors to implement custom search functionality just for Codium is not a viable option, as those webpages can often be from an external source like a website.
A place where you can easily see the issue is in "Show Release Notes", where the webview is not searchable in Codium.
Please confirm that this problem is VSCodium-specific
Please confirm that the issue/resolution isn't already documented
To Reproduce
Simplest steps to quickly reproduce the behavior:
Expected behavior
In MS VSCode, it works, finding the text, scrolling to it, and even highlighting all occurrences as you type on the search box.
In MS VSCode for the Web (testing an extension in a browser IDE with
vscode-test-web
), it works too, though it won't highlight occurrences.In Codium, the find widget opens, but it doesn't work at all. Typing won't highlight occurrences, or enable the previous/next match arrow buttons. Enter doesn't find anything either.
Using the dev tools Console, and selecting the webview frame context, you can run JS API
window.find
just fine, so it's some issue involving the find widget itself, or possibly Chromium/Electron.Screenshots
Codium:
MS VSCode:
Desktop (please complete the following information):
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) VSCodium/1.88.1 Chrome/120.0.6099.291 Electron/28.2.8 Safari/537.36
Additional context
Compared against the Flatpak version of MS VSCode v1.88.0 on the same machine:
The text was updated successfully, but these errors were encountered: