Enter any request (for example, na) in the "Search" menu
Click on any monomer, but without scrolling (for example, Phe-al)
Click on the "Clear" button in the "Search" menu
Verify the initial position of monomers in the tab (the letter A is indicated to the left of the monomers)
Enter any request (for example, na) in the "Search" menu
Scroll down and click on any monomer (for example, OBz)
Click on the "Clear" button in the "Search" menu
Verify the initial position of monomers in the tab (the letters M, N, or X are indicated to the left of the monomers)
Compare results 5 and 9 points
Actual behavior
If the user scrolled the search results, then after clearing the "Search" menu, his viewport in the “Library” panel moves to a random position, not related to the previous search or selected elements. This behavior is observed in the “Peptides” and “RNA” tabs, but if you add a large number of monomers to the “Favorites” tab, then the behavior will be the same
Expected behavior
If the user scrolled the search results, then after clearing the "Search" menu, his viewport in the “Library” panel moves to a predictable position (at the beginning of the list of monomers at the letter A or at the last selected monomer)
Steps to Reproduce
Actual behavior If the user scrolled the search results, then after clearing the "Search" menu, his viewport in the “Library” panel moves to a random position, not related to the previous search or selected elements. This behavior is observed in the “Peptides” and “RNA” tabs, but if you add a large number of monomers to the “Favorites” tab, then the behavior will be the same
Expected behavior If the user scrolled the search results, then after clearing the "Search" menu, his viewport in the “Library” panel moves to a predictable position (at the beginning of the list of monomers at the letter A or at the last selected monomer)
Screenshots
https://github.com/epam/ketcher/assets/139227567/41c92361-d57d-4b69-9085-81923d770ed1
https://github.com/epam/ketcher/assets/139227567/f421d988-51d7-472d-910b-06cb77d9378b
Desktop (please complete the following information):
Ketcher version 2.20.0-rc.1
Issue found while testing https://github.com/epam/ketcher/issues/3750