Search results list auto scrolling possible?

37 views
Skip to first unread message

Mirko Lugano

unread,
Apr 1, 2021, 3:51:03 PM4/1/21
to PDFTron WebViewer
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
wv_demoProblem.PNG
wv_navigate.PNG

Wanbo Li

unread,
Apr 6, 2021, 10:03:13 AM4/6/21
to PDFTron WebViewer
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

Mirko Lugano

unread,
Apr 6, 2021, 11:45:31 AM4/6/21
to PDFTron WebViewer
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

Wanbo Li

unread,
Apr 6, 2021, 9:55:56 PM4/6/21
to PDFTron WebViewer
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

Wanbo Li

unread,
Apr 8, 2021, 9:34:22 AM4/8/21
to PDFTron WebViewer
Reply all
Reply to author
Forward
0 new messages