| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| 5.7.8_ Client App Margin Compatibility _ Universal Canvas Centering source code.tar.gz | 2026-10-12 | 22.5 MB | |
| 5.7.8_ Client App Margin Compatibility _ Universal Canvas Centering source code.zip | 2026-10-12 | 22.8 MB | |
| README.md | 2026-10-12 | 8.1 kB | |
| OpenPublisher-5-x86_64.AppImage | 2026-10-12 | 166.4 MB | |
| openpublisher5_amd64-windows-portable.exe | 2026-10-12 | 183.2 MB | |
| openpublisher5_amd64-windows.exe | 2026-10-12 | 165.2 MB | |
| openpublisher5_amd64-macos.dmg | 2026-10-12 | 233.1 MB | |
| openpublisher5_amd64-linux.run | 2026-10-12 | 193.4 MB | |
| openpublisher5_amd64-linux.rpm | 2026-10-12 | 215.4 MB | |
| openpublisher5_amd64-linux.flatpak | 2026-10-12 | 153.6 MB | |
| openpublisher5_amd64-linux.deb | 2026-10-12 | 156.2 MB | |
| openpublisher5_amd64-freebsd.pkg | 2026-10-12 | 185.5 MB | |
| Totals: 12 Items | 1.7 GB | 0 | |
🚀 Summary
Version 5.7.8 resolves desktop client alignment and navigation inconsistencies occurring inside the NW.js desktop client (wrapper.html embedding the web app in a <webview> frame), while preserving standard browser flexbox behavior and unifying multi-page mode return navigation:
- NW.js Pasteboard Margin Awareness: Automatically detects when desktop container margins are present (
paper.style.marginLeft/marginRight) and harmonizes canvas scroll bounds and resting offsets without causing MutationObserver coordinate thrashing. - User 1 Right-Offset Scroll Defect Resolved: Fixed an issue where scrolling down in NW.js and clicking the floating "Return to Page" button reset
scrollLeftto0, stranding the viewport at the far-left pasteboard margin while the document sat far over to the right. The editor now calculates the true visual horizontal center (paper.offsetLeft + paper.offsetWidth / 2) and centers the page symmetrically in the viewport. - User 2 Top-Left Jump Defect Resolved: Fixed an issue where scrolling down and right into scratch space caused
updateCanvasScrollBounds()to assign conflictingpaper.style.leftoffsets on top of NW.js margins, triggering coordinate resets to(0, 0)that forced users to manually scroll back down and right. Scroll bounds now accurately calculate the effective right edge aspaper.offsetLeft + scaledW + marginRight. - Universal Multi-Page Mode Return: In Multi-Page Overview, clicking "Return to Page" cleanly centers the currently active page slot (
slots[state.currentPageIndex]) and resets vertical scrolling to0, ensuring consistent return navigation across both Single-Page and Multi-Page modes. - Multi-Page Flexbox Alignment Protection: Enforced
!importanton.viewport.multi-page-modeflex alignment (justify-content: flex-start; align-items: flex-start;) and explicitly synchronized flex properties during view mode transitions, preventing the multi-page wrapper from overflowing into negative coordinates. - Adaptive Fit-to-Page / Fit-to-Width Centering: Enhanced
fitToPage()andfitToWidth()to center the document within the available pasteboard scroll area when custom container margins are active. - Complete Version & Cache Synchronization: Synchronized all 82 asset query cachebusters to
?v=5.7.8inindex.html, incremented the Service Worker cache namespace toopen-publisher-v5-7-8, and updated all subsystem headers and logs.
🔍 Root Cause Analysis & Technical Implementation
1. The NW.js Guest Frame Pasteboard Architecture
- Desktop Wrapper Implementation: Inside NW.js desktop builds,
wrapper.htmlhosts the editor within a<webview>frame and injects an asynchronous layout script (updatePaperMargins). This script configures: viewport.style.justifyContent = 'flex-start';paper.style.marginLeft = marginH + 'px';paper.style.marginRight = marginH + 'px';wheremarginHrepresents approximately 80% of the viewport width (e.g. 765px to 960px).- Previous Failure Mode (User 1): In previous versions,
returnToPage()hardcodedtargetLeft = 0whenevershiftNeeded <= 0. Callingviewport.scrollTo({ left: 0 })scrolled the viewport to the absolute left edge of the pasteboard margin (scrollLeft = 0), leaving the document resting atmarginLeft = 765pxfar to the right. - Previous Failure Mode (User 2): In
updateCanvasScrollBounds(), the web app attempted to setpaper.style.left = shiftNeeded + 'px'whenevershiftNeeded > 0, conflicting with the desktop margins and causing coordinate oscillation between the wrapper's MutationObserver and internal bounds recalculation. - The Solution in 5.7.8:
- Implemented
hasCustomMargindetection (!!(paper.style.marginLeft && paper.style.marginLeft !== '' && paper.style.marginLeft !== '0px')). - When
hasCustomMarginis active,updateCanvasScrollBounds()skips assigning inlinepaper.style.leftand computescalculatedRightEdge = Math.max(vpW, effectivePaperRight + rightScratch, paper.offsetLeft + scaledW + marginRight). - In
returnToPage(), single-page mode calculatespaperVisualCenter = paper.offsetLeft + (paperW / 2)and targetsMath.max(0, Math.min(vp.scrollWidth - vpW, Math.round(paperVisualCenter - (vpW / 2)))). - Vertical positioning targets
paperVisualTop <= 60 ? 0 : Math.max(0, Math.min(vp.scrollHeight - vpH, Math.round(paperVisualTop - 50))), providing an exact 50px top padding resting spot.
2. Multi-Page Overview Alignment & Center Targeting
- The Problem: In Multi-Page Mode, if
viewport.style.justifyContent = 'center'remained from single-page mode, Flexbox centered the unscaled#multi-page-wrapperbox across the container, pushing the left edge into negative coordinates ((1080 - 2562) / 2 = -741px). - The Solution:
- Added
!importantto.viewport.multi-page-modeinstyle.css(justify-content: flex-start !important; align-items: flex-start !important;). - Updated
enterMultiPageView()to explicitly setviewport.style.justifyContent = 'flex-start'andviewport.style.alignItems = 'flex-start'. - Updated
exitMultiPageView()to restoreviewport.style.justifyContent = hasCustomMargin ? 'flex-start' : ''. - Updated
highlightAndCenterMultiPageSlot()to includewrapper.offsetLeft(accounting for the 50px viewport padding) and reset vertical scroll to0. - Updated
returnToPage()to delegate tohighlightAndCenterMultiPageSlot(state.currentPageIndex)when in multi-page mode.
📁 Files Modified in 5.7.8
| File | Changes |
|---|---|
canvas/canvas.js |
Added hasCustomMargin detection in updateCanvasScrollBounds(), unified single-page visual center calculations in returnToPage(), updated highlightAndCenterMultiPageSlot() with wrapper offset and vertical reset, synchronized flex alignment in enterMultiPageView() and exitMultiPageView(), and updated fitToPage() and fitToWidth() centering fallbacks. |
style.css |
Added !important to .viewport.multi-page-mode flex alignment rules. Bumped header comments to (v5.7.8). |
index.html |
Synchronized all 82 asset cachebusters to ?v=5.7.8. |
sw.js |
Bumped Service Worker cache namespace to open-publisher-v5-7-8 and header to (v5.7.8). |
extensions/ui-interactions.js |
Bumped About dialog version to v5.7.8. |
extensions/pwa-install.js |
Bumped header to (v5.7.8) and Service Worker registration query to sw.js?v=5.7.8. |
ui/dashboard.js |
Updated template fetch cachebuster queries to ?v=5.7.8. |
extensions/legacy-fixes.js |
Bumped engine log to v5.7.8. |
extensions/print-engine.js |
Bumped print sequence log string to v5.7.8. |
ui/modals/options-modal.js |
Bumped header comment to (v5.7.8). |
ui/sidebar-context.js |
Bumped header comment to (v5.7.8). |
tools/proofing/spellcheck-engine.js |
Bumped header comment to (v5.7.8). |
✅ v5.7.8 Automated Test Verification
| Test Suite | Environment | Scenario | Result |
|---|---|---|---|
| Suite 1A | NW.js Guest Simulation | User 1: Scrolled down 1200px, clicked Return to Page | PASSED (centerOffset: 0px, scrollTop: 0px, button hidden) |
| Suite 1B | NW.js Guest Simulation | User 2: Scrolled down & right into scratch space, clicked Return to Page | PASSED (centerOffset: 0px, scrollTop: 0px, paperTop: 50px, button hidden) |
| Suite 2 | Standard Browser | Standard flexbox centering, scrolled down & right into scratch space | PASSED (centerOffset: 0px, scrollTop: 0px, button hidden) |
| Suite 3 | Multi-Page Mode | Scrolled down 2000px & right 2500px, clicked Return to Page | PASSED (centerOffset: 0px, scrollTop: 0px, slot active preserved, button hidden) |
| Cross-Browser Parity | Chromium & Firefox | Executed all 4 suites across both browser engines | 100% PASSED in both Chromium and Firefox |
🎉 Version 5.7.8 - Open Publisher