-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
"Update import from ..." quick fix doesn't trigger when clicked if on top of code lens #169854
Comments
I can't reproduce this issue. Can you please try putting together a small example project that demonstrates this problem |
Did some debugging, this issue triggers when code fix menu item is overlapping with CodeLens. It doesn't matter what the code fix is. For example in a JavaScript file: module.exports = { a: 1 } // Invoke code fix menu on `module`, add/remove empty lines below to make some menu item overlapping with CodeLens below
// enable `"javascript.referencesCodeLens.enabled": true`, there will be a CodeLens here
function foo() {
} compress.mp4vscode/src/vs/editor/browser/controller/mouseTarget.ts Lines 630 to 638 in 61e40d1
The editor intercepts the event because this hit test found a match. Not sure what "view zone" is, but looking at my original reproduce, there is a CodeLens there. |
Hey @mjbvz, this issue might need further attention. @yume-chan, you can help us out by closing this issue if the problem no longer exists, or adding more information. |
@mjbvz Please try again using the new repro step above. It's still reproducible in latest insiders version. |
Thank you @yume-chan! I can repo now @alexdima I believe the root cause is that our editor mouse handlers don't know about context views. In this instance, clicking in the action widget fires
This code ends up thinking that the user has clicked on an Can you provide some suggestions on how to fix this? I tried adding a new |
I see. The root problem is that we add a foreign dom node to the editor dom node via direct DOM APIs and that is unexpected to the mouse handling logic. The foreign dom nodes added to the editor have so far been added via API (content widgets, overlay widgets, etc.). |
Fixes #169854: ignore surprising dom nodes
Type: Bug
🐛: Quick fix widget closes, but no import updated
Recording.2022-12-22.234211.mp4
VS Code version: Code - Insiders 1.75.0-insider (42814d1, 2022-12-22T05:21:47.548Z)
OS version: Windows_NT x64 10.0.25267
Modes:
Sandboxed: Yes
System Info
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
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Extensions (34)
The text was updated successfully, but these errors were encountered: