Arduino IDE's "SKETCHBOOK" view shows a list of the sketches in the sketchbook folder. When sketches are located under a subfolder, or when the "Show files inside Sketches" preference is enabled, the folder tree can be expanded or collapsed by clicking the ❯ or ˅ icon to the left of the folder name in the view.
🐛 The view scrolls to make the currently selected item visible when the tree control icons are used.
To reproduce
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Check the box next to "☐ Show files inside Sketches.
Click the "OK" button.
The "Preferences" dialog will close.
Click the folder icon to open the "SKETCHBOOK" view in the side panel of the Arduino IDE window.
If you don't already have enough sketches in your sketchbook to cause the "SKETCHBOOK" view to be scrollable, perform repeated File > Save As... operations until you have enough sketches.
Click on the first item on the list.
The item will be highlighted to indicate it is selected.
Scroll to the bottom of the "SKETCHBOOK" view.
Click the ❯ icon on the last sketch/folder on the list.
🐛 The view is scrolled up to the top, making the list item you were interacting with no longer visible.
Expected behavior
The
Arduino IDE version
aa9b10d68e6653b7f40ab920173c7964aaefbfa4
Operating system
Windows
Operating system version
11
Additional context
I arbitrarily chose to specify the use of the first and last list items in the demo, but the fault will occur with items at any position as long as the selected item is scrolled out of the visible view.
Describe the problem
Arduino IDE's "SKETCHBOOK" view shows a list of the sketches in the sketchbook folder. When sketches are located under a subfolder, or when the "Show files inside Sketches" preference is enabled, the folder tree can be expanded or collapsed by clicking the ❯ or ˅ icon to the left of the folder name in the view.
🐛 The view scrolls to make the currently selected item visible when the tree control icons are used.
To reproduce
🐛 The view is scrolled up to the top, making the list item you were interacting with no longer visible.
Expected behavior
The
Arduino IDE version
aa9b10d68e6653b7f40ab920173c7964aaefbfa4
Operating system
Operating system version
11
Additional context
I arbitrarily chose to specify the use of the first and last list items in the demo, but the fault will occur with items at any position as long as the selected item is scrolled out of the visible view.
Originally reported by @dougp2 at https://forum.arduino.cc/t/sketch-folder-jumps-to-wrong-place-ide-2-3-2/1271809
Workaround
Click on the list item before clicking on its tree control icon.
Issue checklist