Search results focus the first file and scroll to it, ignoring "Sort folders before files" preference
This is a variant / related problem to #2804, because it it is triggered in the same kind of conditions.
Affected version
- Nightly flatpak: Yes
- Other: 43.2 on Fedora 37
Steps to reproduce
- Make sure the "Sort folders before files" settings is enabled
- Go to a folder that has many folders and files (such as your XDG "Documents" folder), preferrably in listview mode (it will make the problem more obvious)
- Search for a term that will return a lot of results, both files and folders (ex: "invoice")
Current behavior
Search results will start by showing files, then it will also show matching folders above them (since the "Show folders before files" preference is turned on), however the scrollbar will have been automatically scrolled to some of the files, instead of sticking to the top.
Expected behavior
Scrollbar should stick to the top of the search results, and if the first item of the list is automatically focused, it should be the first folder instead of some file.