Skip to content
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

CodeLens become inactive after Webview is open #198309

Closed
ak1394 opened this issue Nov 15, 2023 · 8 comments · Fixed by #211999
Closed

CodeLens become inactive after Webview is open #198309

ak1394 opened this issue Nov 15, 2023 · 8 comments · Fixed by #211999
Assignees
Labels
code-lens help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders webview Webview issues
Milestone

Comments

@ak1394
Copy link

ak1394 commented Nov 15, 2023

Type: Bug

When Webview is open with ViewColumn.One, Codelenses become inactive (codelenses don't change color when hovered, nothing happens when codelense is clicked).

To reproduce, launch extension sample: https://github.com/ak1394/vscode-extension-samples/tree/main/webview-sample

(This is a combination of webview-sample and codelens-sample from vscode-extension-samples)

  1. Enable code lenses with the 'CodeLens Sample: Enable CodeLens' command
  2. Create empty file, type something in there and observe code lens shown and it, and that it active and works
  3. Open 'Cat Coding' webview with the 'CatCoding: Start cat coding session' command
  4. Switch back to the file created in step 1 and observe that codelens doesn't work anymore.
  5. Close cat coding webview or move it into a second column, codelense begins to work.

VS Code version: Code 1.84.2 (Universal) (1a5daa3, 2023-11-09T10:52:33.687Z)
OS version: Darwin x64 23.0.0
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz (8 x 2300)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 5, 5, 5
Memory (System) 32.00GB (9.37GB free)
Process Argv --crash-reporter-id 101bac8a-ab5f-4da6-a41d-e197d4ab19af
Screen Reader no
VM 0%
Extensions (23)
Extension Author (truncated) Version
vscode-openapi 42C 4.18.6
prettier-vscode esb 10.1.0
vscode-jest-runner fir 0.4.69
go gol 0.39.1
vscode-dotnet-runtime ms- 2.0.0
python ms- 2023.20.0
vscode-pylance ms- 2023.11.10
jupyter ms- 2023.10.1100000000
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.17
vscode-jupyter-cell-tags ms- 0.1.8
vscode-jupyter-slideshow ms- 0.1.5
azurerm-vscode-tools msa 0.15.11
vscode-thunder-client ran 2.16.0
java red 1.24.0
vscode-yaml red 1.14.0
intellicode-api-usage-examples Vis 0.2.8
vscodeintellicode Vis 1.2.30
vscode-java-debug vsc 0.55.0
vscode-java-dependency vsc 0.23.2
vscode-java-pack vsc 0.25.15
vscode-java-test vsc 0.40.1
vscode-maven vsc 0.43.0
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30880072
vscaac:30438847
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
282f8724:30602487
f6dab269:30613381
a9j8j154:30646983
showlangstatbar:30737416
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30869155
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30871694
pythonregdiag2:30871582
pyreplss2:30886141
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:30885897
pythontbext0:30879054
accentitlementsc:30887149
dsvsc016:30886110
dsvsc017cf:30886113
dsvsc018cf:30886115
aa_t_chat:30882232

@ak1394
Copy link
Author

ak1394 commented Nov 27, 2023

Hi @mjbvz ! Please let me know if you require any additional info. Also, I didn't mention it in the original report but I have tried it with extensions disabled and experienced the same issue.

@mjbvz mjbvz added webview Webview issues code-lens labels Dec 12, 2023
@mjbvz mjbvz added this to the Backlog milestone Dec 12, 2023
@mjbvz mjbvz added the help wanted Issues identified as good community contribution opportunities label Dec 12, 2023
@flyyuan
Copy link

flyyuan commented Feb 5, 2024

Is there a logical conflict between WebView and CodeLens? @mjbvz

@flyyuan
Copy link

flyyuan commented Feb 6, 2024

@mjbvz can I take this one or is someone else working on it?

@Med-H
Copy link

Med-H commented Mar 9, 2024

any news on this?

@ak1394
Copy link
Author

ak1394 commented Mar 28, 2024

BTW, it doesn't have to be a WebView open by an extension to cause this. I can open VS Code "Settings" pane, and while it's open, none of the CodeLenses are clickable.

@Med-H
Copy link

Med-H commented Apr 5, 2024

This can be reproduced easily (I think all newer vscode versions are impacted )
P.S: all extensions are turned off

Apr-05-2024 16-40-30

@CalvinAllen
Copy link

Any update on this? We seen to be experiencing the same issue with our extension that adds custom CodeLenses to a new file type we're working on.

@gjsjohnmurray
Copy link
Contributor

I have submitted a PR to fix this.

@mjbvz mjbvz modified the milestones: Backlog, May 2024 May 6, 2024
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-lens help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders webview Webview issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants