Search results list auto scrolling possible?

Hi, I have just updated WebViewer to version 7.3.0, I have a question about the search panel, and specifically the list of search results.
When navigating search results with the arrows (see picture attached), the list does not scroll along, so that the “selected” search results can disappear from the viewport.
I had tested this also on the official demo at https://www.pdftron.com/webviewer/demo/ and it’s the same there, although as of today there is maybe a problem with the demo, since search results cannot get loaded (see screenshot of error attached).
With the previous version of webViewer that I had (5.1.0) I had implemented a custom scrolling mechanismus based on the selected element in the list relative to the other elements. Now this is no longer possible, since on scrolling, the elements in the list appear and disappear from the DOM dinamically depending on the current “viewport”. Is there a chance to either set up autoscrolling when navigating through results, or have the results always present in the list, so that I can implement my own scrolling?
Thanx in advance, best regards
Mirko

Hi Mirko,

As for the error, could you try this online sample and see if you can still see the error there? And as for the search result list, it’s due to the virtualized list which only shows limited number of items on the DOM. I’ll take a look to see if the virtual list can be disabled or see if the list can scroll when changing the selected result.

Wanbo

Hi Wanbo,
the search in the online sample you provided me with works, thank you.
Thank you for taking a look into my proposal, I’m looking forward to hearing news from you. Of course, autoscrolling “out of the box” would be ideal, but I could also do with having all elements in the DOM and implement autoscrolling myself.
Best regards
Mirko

Hi Mirko,

I have just created a PR for auto scrolling to selected search result, and it’s in review right now. Will keep you updated of the status. Thanks for your patience.

Wanbo

Hi Mirko,

The fix has been merged into master branch. I’m cherry picking it to 7.3 branch, and after it’s done, you can get it from the latest nightly build of v7.3. Thanks.

Wanbo

Hi Wanbo
thank you very much, I’ll try it for sure. I suppose it will then be later also included in the npm-package. We do an npm-update automatically every day so hopefully it will be automatically in it in the near future (we’re not in a hurry :slight_smile: )
Best regards and thank you again
Mirko

Hi Mirko,

I have just cherry picked the fix to 7.3, and it should be available in the next nightly build tomorrow. Please check this link for how to get nightly build. Thanks.

Wanbo