vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

[CMake Cache Editor] drop-down lists are not working properly

Open tehKaiN opened this issue 2 years ago • 5 comments

Brief Issue Summary

Consider following code (from https://github.com/AmigaPorts/ACE):

set(ACE_LIBRARY_KIND OBJECT CACHE STRING "Build kind: static library or bunch of .o files. OBJECT allows for more link-time optimizations.")
set(ACE_LIBRARY_KINDS "OBJECT" "STATIC")
set_property(CACHE ACE_LIBRARY_KIND PROPERTY STRINGS ${ACE_LIBRARY_KINDS})

This results in following UI, which is correct:

obraz

however, clicking to expand the drop-down list does the following:

obraz

  • the drop-down list is in wrong position
  • other options than currently cached don't show up

CMake Tools Diagnostics

n/a

Debug Log

n/a

Additional Information

No response

tehKaiN avatar Apr 18 '23 07:04 tehKaiN

Thanks for the report! I can reproduce this and we'll try to get a fix out soon.

benmcmorran avatar Apr 18 '23 16:04 benmcmorran

@tehKaiN A quick update.

The way that the list works is that it filters the search results based on what you've entered. We are using the datalist html element, which filters. Thus, if you want to see all of the available options, you should remove any text input. This should unblock you in regards to selecting any other options.

I'm still investigating why it appears in a weird location.

gcampbell-msft avatar Apr 18 '23 19:04 gcampbell-msft

Indeed, it works! Dunno if that's good though, since for me it works kinda counter-intuitive, but maybe it's just me. Ideally, if that's possible and isn't that complex, the drop-down button could show all the options, whereas while typing there could be a second drop-down variant which only shows suggestions - I think that's usual native way of how combo boxes work.

Also currently, when input is empty, I can't press the down arrow to cycle through values - it shows the list, but doesn't select anything on consecutive button presses - this is quite different behavior from bare datalist html element, isn't it? Perhaps some script is playing tricks there.

tehKaiN avatar Apr 18 '23 19:04 tehKaiN

@tehKaiN We've narrowed this down to a likely bug in VSCode itself and have tracked it here https://github.com/microsoft/vscode/issues/180253.

Thanks!

gcampbell-msft avatar Apr 18 '23 20:04 gcampbell-msft

Tracking here: https://github.com/microsoft/vscode/issues/129999

gcampbell-msft avatar Jun 25 '24 13:06 gcampbell-msft