New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextDocumentContentProvider renders gibberish with 1.26.1 update #57749
Comments
Your extension doesn't seem to create a valid html document (no docstring, trailing divs, potentially other issues). Please make sure the html content is valid, fully compliant html |
@dbaeumer I don't think it's related to the blur - there's no blur, just badly rendered html. This is the picture after the first run: After the subsequent runs it would settle down. @mjbvz I fixed it to be fully valid html as checked by https://validator.w3.org/nu/#textarea As I expected this did not help, but it was worth a shot I suppose. Here's what the html looks like before it is thrown into the meatgrinder: |
@mjbvz Oops, sorry about that. I haven't tested it with python 3.7 yet. I think I know why you are getting an error so I should be able to have a fix for that shortly. |
@mjbvz I just released a new version. It has python 3.7 support and fully compliant html, among other unrelated fixes. |
I looked through the relevant webview files (extHostDocumentContentProvider, webview-pre.js, webviewElement.ts) and none of them got changed between 1.26 and 1.26.1 In fact, none of the files inside the webview folder got changed in the time frame between 1.26 and 1.26.1 (august 13th - august 16th). The last change to the webview folder before august 16th was a merge on the 6th, but that would have gone out with 1.26 But I used a mac with a old version of vscode and my extension worked fine, so there definitely was a problem introduced somewhere 🤔 I think I'll try switching to the new webview. Maybe that will help. |
Looks like the new webview works :D |
Ok, thank you for taking a look. Yes I recommend using a webview going forward. Since I have not see this reported reported for any other extensions using the |
@mjbvz I didn't know previewHtml is now deprecated - is this in any of the documentation yet? I didn't see anything in the docs and vscode-extension-samples still has a sample with previewHtml |
Extension example show it as deprecated now :) https://github.com/Microsoft/vscode-extension-samples/tree/master/previewhtml-sample Will also update documentation for next release |
In the AREPL extension I update TextDocumentContentProvider frequently whenever I get a result/print from my python backend. This used to work fine but as of 1.26.1 update it has some serious problems. The updates are throttled to once every 50 ms but even with once every 500 ms I see problems.
Steps to Reproduce:
In this case on the first run you get complete gibberish
On the second run you get less gibberish:
And on the third run and all runs after that it works fine.
I know this is not a problem with my extension because it only started happening after the v1.26.1 release. But I have no idea what could have caused the issue - I looked through the 1.26.1 issues and didn't see anything suspicous.
The text was updated successfully, but these errors were encountered: