ApryseSDK / webviewer-ui

WebViewer UI built in React
Other
416 stars 354 forks source link

[Bug] Shift+Click thumbnails degraded behavior in 10.6 #1041

Open Hobatron opened 10 months ago

Hobatron commented 10 months ago

WebViewer version 10.6 The current behavior Shift clicking thumbnails only let's you select one set of documents this is a degraded behavior from previous versions.

The expected behavior In past versions you could shift+click a set of docuemnt, then shift+click others separate from the first. This is a behavior our customers REQUIRE, and we've had to make a local version to fix this lost functionality.

Steps to reproduce Use shift+click a set of documents, then try and shift+click another set. You lose your first set of selected documents.

This seems fairly intentional, but we can't understand why.

FIX: https://github.com/PDFTron/webviewer-ui/blob/3b0baead7c2fda7d7d1661b2e092fda74eba1a67/src/components/Thumbnail/Thumbnail.js#L180

Add: ...updatedSelectedPages,

bollain commented 9 months ago

HI @Hobatron,

Thanks for reaching out.

This behaviour is still supported - for the second selection you must use the CTRL key. We changed this behaviour as the previous code was creating unintended side effects.

https://github.com/PDFTron/webviewer-ui/assets/10825527/de177340-83f1-45a2-a6af-15cc472f3063

bollain commented 9 months ago

Looking at this code again, this issue may have been due to the pivot index. This was the issue we came up against that caused this change: Open the thumbnails panel. Select Page 1, and then click shift to page 4 1-4 will be selected Now de-select page 2 then 1, in this order Now select page 2 with click + shift 1-4 will be selected, when we wanted 2

https://github.com/PDFTron/webviewer-ui/assets/10825527/8c201157-9991-4b76-b881-2cb2702decbe