[CustomTextEditor extension] onDidReceiveMessage and resolveCustomTextEditor are not called after restarting extension host #150135
Labels
custom-editors
Custom editor API (webview based editors)
*duplicate
Issue identified as a duplicate of another issue(s)
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
TL/DR:
When restarting extension host, the CustomTextEditor the WebView HTML is somehow preserved and reloaded, but the
onDidReceiveMessage
subscriptions are lost (andresolveCustomTextEditor
which sets up the subscription is not called).catScratchEditor.ts
: Addconsole.log("resolveCustomTextEditor called");
as the first line of theresolveCustomTextEditor
function. Addconsole.log("onDidReceiveMessage called");
as the fist line of thewebviewPanel.webview.onDidReceiveMessage
handler.dummy.txt
.dummy.cscratch
file to preview it in custom editordummy.txt
filedummy.cscratch
tab.resolveCustomTextEditor
and nowebviewPanel.webview.html =
assignments).onDidReceiveMessage
handler is not getting called anymore andresolveCustomTextEditor
which could re-install the handler is never called either.2022-05-22.14-36-00.mp4
P.S. The VScode debug console has the following error message, but I do not know whether it's related:
The text was updated successfully, but these errors were encountered: