mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Revert "[PDFSidebarResizer] Refactor the clamping in _updateWidth
"
This reverts commit 9e4552d792
for causing the sidebar to become too narrow when the entire viewer is resized.
**Steps to reproduce:**
1. Load the viewer.
2. Open the sidebar.
3. Resize the sidebar, making it wider.
4. Resize the entire viewer, i.e. the browser window, making it *narrower* than 400 pixels.
**Expected result:**
The sidebar width is clamped at 200 pixels.
**Actual result:**
The sidebar becomes too narrow.
The cause of this bug is, in hindsight, quite obvious since the `clamp` helper function implicitly assumes that the `min`/`max` arguments are correctly sorted. At viewer widths *below* 400 pixels, that assumption is broken which explains the bug.
This commit is contained in:
parent
e51e9d1f33
commit
2594f0c738
2 changed files with 11 additions and 10 deletions
|
@ -1006,7 +1006,6 @@ export {
|
|||
SpreadMode,
|
||||
NullL10n,
|
||||
EventBus,
|
||||
clamp,
|
||||
ProgressBar,
|
||||
getPDFFileNameFromURL,
|
||||
noContextMenuHandler,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue