| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| OpenPublisher5-i386-windowsXP.exe | 2026-10-21 | 56.5 MB | |
| openpublisher5_amd64-windows-portable.exe | 2026-10-21 | 183.2 MB | |
| openpublisher5_amd64-windows.exe | 2026-10-21 | 165.2 MB | |
| openpublisher5_amd64-macos.dmg | 2026-10-21 | 233.1 MB | |
| openpublisher5_amd64-linux.run | 2026-10-21 | 193.4 MB | |
| openpublisher5_amd64-linux.rpm | 2026-10-21 | 215.4 MB | |
| openpublisher5_amd64-linux.flatpak | 2026-10-21 | 153.6 MB | |
| openpublisher5_amd64-linux.deb | 2026-10-21 | 156.2 MB | |
| openpublisher5_amd64-linux.AppImage | 2026-10-21 | 166.4 MB | |
| 5.11.9_ Text Selection Retention on Right-Click, Word Cut Whitespace Preservation _ Clipboard Hardening source code.tar.gz | 2026-10-21 | 23.4 MB | |
| 5.11.9_ Text Selection Retention on Right-Click, Word Cut Whitespace Preservation _ Clipboard Hardening source code.zip | 2026-10-21 | 23.6 MB | |
| README.md | 2026-10-21 | 10.7 kB | |
| openpublisher5_amd64-freebsd.pkg | 2026-10-21 | 185.5 MB | |
| Totals: 13 Items | 1.8 GB | 0 | |
π Summary
Version 5.11.9 delivers precision text selection and cutting improvements for OpenPublisher:
- Text Selection Preservation on Right-Click: When text inside a text box is highlighted and the user right-clicks on the selection, the highlighted text remains visibly selected while the context menu opens, matching professional desktop publishing standards (such as Microsoft Publisher, Word, and Google Docs).
- Word Cut Trailing Space Preservation: When a user selects a single word amongst a sentence (via double-click or drag-select) and cuts it (via Context Menu Cut, Ribbon Cut, or Ctrl + X), OpenPublisher now preserves the trailing space following the word. The sentence maintains its natural spacing (e.g. cutting "beautiful" from "Hello beautiful world" cleanly leaves both spaces intact rather than collapsing them to "Hello world").
- Mid-Word & Partial Cut Safety: Mid-word cuts (such as selecting "eauti" in "beautiful") continue to cut strictly the highlighted letters without modifying or deleting neighboring characters or word boundaries.
- Clean Word Copy & Cut to Clipboard: When a word is selected via double-click, Chromium automatically attaches trailing whitespace to the selection. OpenPublisher now automatically trims the trailing whitespace from the cut and copy buffer so only the clean word itself is placed on the clipboard.
- Primary Button Filtering in TextDragSystem: Guarded
TextDragSystem.startDrag(e)andonMouseUp(e)to strictly respond to the primary mouse button (e.button === 0). Secondary right-clicks (e.button === 2) on highlighted text no longer trigger drag sessions, suppress event bubbling, or collapse the selection to a single point. - Canvas MouseDown Event Shielding: Added strict primary button checks across all canvas
handleMouseDownhandlers (extensions/system-patches.js,canvas/interaction-mouse.js,canvas/interaction.js) and the multi-select event shield. Right-clicks no longer initiate canvas drag modes, transform handlers, or element repositioning. - Dual-Layer Context Menu Range Restoration: Enhanced
handleRightClickinui/menus.jsto capture and clone the active selection range intowindow._contextTargetRange, re-asserting the range upon menu display to guarantee the highlight is visibly retained on screen. - Context Menu & Keyboard Cut Unification: Unified context menu "Cut", ribbon "Cut", and keyboard shortcut
Ctrl + X(orCmd + X) so all cut operations route through the centralized, space-preserving text cutting engine inextensions/legacy-fixes.js.
All 85 asset cachebusters across index.html have been upgraded to ?v=5.11.9, and the Service Worker cache has been bumped to open-publisher-v5-11-9.
π¨ Key Features & Architectural Improvements
1. Word Cut Trailing Space Preservation & HTML Spacing Protection (extensions/legacy-fixes.js)
- Root Cause Analysis:
- In Chromium and WebKit browsers, double-clicking a word in a sentence automatically expands the selection boundary to include the trailing whitespace character.
- Furthermore, native browser cut commands (
document.execCommand('cut')and unpreventedCtrl+X) invoke Chromium's smart-delete logic. When the character immediately before the selection is a whitespace character, Chromium automatically deletes the trailing whitespace after the selection. - When cutting via
sel.deleteFromDocument(), removing a word between two regular spaces left two ASCII spaces (Hello world). In standard HTML withoutwhite-space: pre-wrap, adjacent ASCII spaces collapse visually into a single space, causing the space at the end of the word to appear deleted. - Architectural Solution:
- In
window.copyEl(isCut):- Trailing Whitespace Trimming: If the text selection ends with trailing whitespace (such as from double-clicking), the cut range is trimmed to exclude the trailing space before deletion. The trailing space remains in the document text node.
- Space Preservation Guard: Prior to deletion, OpenPublisher inspects
charBefore(the character immediately preceding the start of the range) andcharAfter(the character immediately following the end of the range). - Non-Breaking Space Conversion: If
charBeforeis a space andcharAfteris a space, the preceding space is converted to a non-breaking space (\u00A0/ ). This prevents HTML whitespace collapsing from eating the trailing space, ensuring both spaces remain fully visible on screen. - Input Event Dispatch: Dispatches an
inputevent on the editable host element to ensure undo/redo history and live text listeners are kept in sync.
2. Centralized Keyboard Shortcut & Global Cut Listener (core/keyboard.js, extensions/legacy-fixes.js)
- Keyboard Shortcut Interception:
- In
core/keyboard.js, updated theCtrl + X(andCmd + X) handler so that whenisTextEditing() && hasTextSelis active, it callse.preventDefault()and delegates directly towindow.cutEl(). - Global Cut Event Shield:
- Added a capturing
cutevent listener ondocumentinextensions/legacy-fixes.js. Any cut event triggered on an activecontenteditableelement is intercepted and routed throughwindow.copyEl(true), preventing Chromium's native smart-delete from executing.
3. Context Menu Range Capture & Whitespace Trimming (ui/menus.js)
- When the user right-clicks on selected text,
ui/menus.jscaptures the selection intowindow._contextTargetRange. - If the selection ends with trailing whitespace from double-clicking, the range and selection are trimmed to strictly target the word itself.
- When the context menu opens, the blue selection highlight is cleanly confined to the word, and clicking "Cut" or "Copy" operates strictly on the targeted word.
4. Primary Button Filtering in Canvas Text Drag (canvas/text-drag.js)
- Guarded
TextDragSystem.startDrag(e)withif (!e || e.button !== 0) return false;. - Guarded
TextDragSystem.onMouseUp(e)withif (!e || e.button !== 0) return;. - Right-clicks on highlighted text are ignored by the drag system, allowing native browser selection retention and context menu events to proceed uninterrupted.
5. Canvas MouseDown Event Shielding (extensions/system-patches.js, canvas/interaction-mouse.js, canvas/interaction.js)
- Added
if (e.button !== 0) return;at the entry point ofwindow.handleMouseDowninextensions/system-patches.js,canvas/interaction-mouse.js, andcanvas/interaction.js. - In
extensions/system-patches.jsline 4 (installEventShield), addedif (e.button !== 0) return;to prevent Ctrl+right-click from hijacking multi-select logic. - Secondary clicks no longer initiate canvas drag modes, transform handlers, or element repositioning.
π Files Modified in 5.11.9
| File | Changes |
|---|---|
extensions/legacy-fixes.js |
Enhanced window.copyEl(isCut) to trim trailing whitespace from word cut ranges, protect against HTML space collapsing via \u00A0, and install global cut event listener. |
core/keyboard.js |
Updated Ctrl + X handler to route through window.cutEl() when text is selected, preventing native smart-delete space removal. |
ui/menus.js |
Enhanced handleRightClick() to trim trailing whitespace from context range and re-assert active selection. |
canvas/text-drag.js |
Added primary mouse button check (e.button !== 0) to startDrag() and onMouseUp(). Updated module header to v5.11.9. |
canvas/interaction-mouse.js |
Guarded window.handleMouseDown with if (e.button !== 0) return;. |
canvas/interaction.js |
Guarded handleMouseDown with if (e.button !== 0) return;. |
extensions/system-patches.js |
Guarded installEventShield and window.handleMouseDown against non-primary clicks. Guarded TextDragSystem.startDrag call with e.button === 0. |
index.html |
Updated all 85 asset cachebusters from ?v=5.11.8 to ?v=5.11.9. |
sw.js |
Bumped service worker cache name to open-publisher-v5-11-9 and version header to (v5.11.9). |
core/boot.js |
Bumped application bootstrapper version header to v5.11.9. |
core/core.js |
Bumped core engine version header to v5.11.9. |
elements/text/text.js |
Bumped Text Engine and Styled Text Box System version headers to v5.11.9. |
extensions/print-engine.js |
Bumped print engine version header to v5.11.9. |
extensions/pwa-install.js |
Bumped PWA and desktop download engine version header to v5.11.9. |
extensions/smart-images.js |
Bumped Smart Images engine version header and initialization log to v5.11.9. |
extensions/ui-interactions.js |
Bumped UI interactions and ruler tracking engine version header and initialization log to v5.11.9. |
ui/modals/card-sheet-modal.js |
Bumped card and label imposition engine version header to v5.11.9. |
ui/modals/options-modal.js |
Bumped options modal version header to v5.11.9. |
ui/sidebar-context.js |
Bumped sidebar context menu version header to v5.11.9. |
β Verification Checklist
- [x] Word Cut Trailing Space Preservation (Context Menu): Verified via automated Playwright test that selecting "beautiful" in "Hello beautiful world" and cutting via the context menu leaves "Hello world" with both spaces preserved (
res.innerText === 'Hello\xa0 world'). - [x] Word Cut Trailing Space Preservation (Ctrl + X): Verified that double-clicking "beautiful" and pressing
Ctrl + Xpreserves the trailing space and places clean "beautiful" onto the clipboard. - [x] Word Cut Trailing Space Preservation (Ribbon Cut): Verified that clicking the ribbon Cut button preserves the trailing space.
- [x] Mid-Word Cut Boundary Integrity: Verified that selecting and cutting "eauti" in "Hello beautiful world" produces "Hello bful world" with word boundaries and spaces completely unaffected.
- [x] Text Selection Preservation on Right-Click: Verified that selecting text and right-clicking directly on it keeps
window.getSelection().toString()intact andisCollapsed === false. - [x] Context Menu Text Actions: Verified that "Copy" in the context menu copies the highlighted text to
state.copiedText. - [x] Outside Right-Click Caret Placement: Verified that right-clicking outside the selected text collapses the selection as expected.
- [x] Service Worker & Cachebusters: Verified all 85 asset cachebusters in
index.htmland the Service Worker cache name (open-publisher-v5-11-9) are upgraded.
π Version 5.11.9 - Open Publisher