microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.98k stars 29.53k forks source link

Can't hover on top few pixels of editor #188878

Open mjbvz opened 1 year ago

mjbvz commented 1 year ago

Type: Bug

  1. In a JS file:
console.log(123)
console.log(123)
console.log(123)
console.log(123)
  1. Scroll so the first line is just a little bit off the top of the screen
  2. Try over console on the first line at the very top of the screen

bug Only part of the word is hoverable. If the cursor is too close to the top of the editor, it transformed from the text cursor icon into the pointer icon and hover no longer works

image

Notice how the cursor is over the text but using the pointer icon instead of the normal text icon

VS Code version: Code - Insiders 1.81.0-insider (Universal) (fda972663af87b4d1dab87845e36c357738b44f9, 2023-07-25T08:15:40.243Z) OS version: Darwin x64 22.5.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
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, 4, 3| |Memory (System)|32.00GB (1.40GB free)| |Process Argv|--crash-reporter-id 48781ca2-1705-4f64-9bab-325055aab55d| |Screen Reader|no| |VM|0%|
mjbvz commented 1 year ago

This seems to be caused by the scroll-decoration element in the editor:

<div role="presentation" aria-hidden="true" class="scroll-decoration" style="width: 700px;"></div>

Not sure if this is intentional or not. Adding pointer-events: none; to the element fixes the issue