| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| OpenPublisher5-i386-windowsXP.exe | 2026-10-16 | 56.5 MB | |
| openpublisher5_amd64-windows-portable.exe | 2026-10-16 | 183.2 MB | |
| openpublisher5_amd64-windows.exe | 2026-10-16 | 165.2 MB | |
| openpublisher5_amd64-macos.dmg | 2026-10-16 | 233.1 MB | |
| openpublisher5_amd64-linux.run | 2026-10-16 | 193.4 MB | |
| openpublisher5_amd64-linux.rpm | 2026-10-16 | 215.4 MB | |
| openpublisher5_amd64-linux.flatpak | 2026-10-16 | 153.6 MB | |
| 5.8.7_ Grammar Underline Bleed _ Context Menu Proofing Resolution source code.tar.gz | 2026-10-16 | 23.3 MB | |
| 5.8.7_ Grammar Underline Bleed _ Context Menu Proofing Resolution source code.zip | 2026-10-16 | 23.6 MB | |
| README.md | 2026-10-16 | 9.4 kB | |
| openpublisher5_amd64-linux.deb | 2026-10-16 | 156.2 MB | |
| openpublisher5_amd64-linux.AppImage | 2026-10-16 | 166.4 MB | |
| openpublisher5_amd64-freebsd.pkg | 2026-10-16 | 185.5 MB | |
| Totals: 13 Items | 1.8 GB | 0 | |
π Summary
Version 5.8.7 resolves two critical text proofing and contextual menu interactions in OpenPublisher: green squiggly grammar lines stretching or bleeding into neighboring words and whitespace, and grammar check suggestions failing to display in the right-click context menu when misspelled words are present or when right-clicking text boxes.
This release delivers comprehensive accuracy improvements to the CSS Custom Highlight proofing system and context menu dispatching pipeline:
- Grammar Underline Accuracy (No More Bleed or Truncation): LanguageTool tokenizes contractions like
it'sinto separate tokens (itand's). For sentence start capitalization, LanguageTool previously flagged onlyit, leaving the squiggly underline truncated toitwhile clipping or bleeding into adjacent characters. In v5.8.7, sentence start and casing checks automatically expand contraction suffixes so the entire contraction (it's) is highlighted and replaced cleanly. - Elimination of Whitespace Squiggles & Edge Bleed: Whitespace rules flagging double spaces are now skipped during visual highlight painting to eliminate floating detached squiggles. Additionally,
createRangeForOffsetsstrictly trims leading and trailing whitespace characters, ensuring wavy underlines never bleed across blank spaces. - Context Menu Editable Resolution (Text Box Context Menu Fix): Fixed a broken ternary evaluation in
ui/menus.jswhere right-clicking an outer element wrapper failed to resolve the inner[contenteditable="true"]child element, leaving_currentSpellCheckEditableasnulland suppressing all grammar suggestions. A dedicated context resolver now robustly identifies the active editable container across outer element wrappers, caret ranges, selections, and active state. - W3C Range Boundary Overlap Correction: Corrected the boundary point comparisons in
getIssueAt(). The previous logic incorrectly checked<= 0and>= 0, requiring ranges to simultaneously precede and succeed each other. The updated logic accurately validates range intersection (END_TO_START > 0andSTART_TO_END < 0), collapsed caret containment, and multi-word token overlap. - Detached Range DOMException Prevention: When text in an editable container is modified, text nodes are recreated, causing cached DOM Range objects to disconnect.
paintHighlightsandgetIssueAtnow detect disconnected ranges (!range.startContainer.isConnected) and recreate them on the fly. - Context Menu Proofing Replacement Preservation: Proofing ranges are now preserved while the context menu remains open and cleared only upon menu closure, allowing
applyGrammarandapplySpellingto apply replacements directly to the targeted text range.
π Architecture & Technical Implementation
1. Grammar Underline Bleed & Contraction Truncation Root Cause & Solution
- The Issue: LanguageTool tokenizes contractions like
it'sasitand's. For rules such asUPPERCASE_SENTENCE_START, it returned an offset covering onlyit. This caused onlyitto receive the green underline. Furthermore, speculative token snapping previously shifted offsets backward into preceding words, while whitespace rules (WHITESPACE_RULE) generated squiggly lines underneath whitespace. - The Solution in
tools/proofing/spellcheck-engine.js: - In
checkEditableWithLanguageTool:- Discard pure whitespace matches (
matchedStr.trim().length === 0). - Inspect contraction suffixes following the match with
/^(['β][A-Za-z]+)/. When a contraction suffix is detected for casing or sentence start rules, expandmatchLength,matchedStr, and all replacement strings so the entire contraction is underlined and replaced.
- Discard pure whitespace matches (
- In
createRangeForOffsets:- Trim any leading or trailing whitespace bounds using index scanning before creating DOM Range endpoints.
- Removed speculative token snapping that shifted ranges into neighboring words.
- In
paintHighlights:- Verify that cached grammar ranges are still attached to the DOM (
range.startContainer.isConnected), recreating detached ranges automatically.
- Verify that cached grammar ranges are still attached to the DOM (
2. Context Menu Multi-Issue Suppression Root Cause & Solution
- The Issue: Right-clicking a grammar error failed to show grammar suggestions whenever misspelled words existed or when right-clicking a text box. This was caused by three interacting bugs:
- Broken Ternary in
ui/menus.js:(e.target && e.target.closest)was always truthy. When right-clicking.pub-element,e.target.closest('[contenteditable="true"]')returnednullbecause the editable is a child element, not an ancestor. The fallbackel.querySelector('[contenteditable="true"]')was never reached, setting_currentSpellCheckEditable = null. - Inverted Range Overlap in
getIssueAt: ComparingRange.END_TO_START <= 0andRange.START_TO_END >= 0required the test range to end before the issue starts AND start after the issue ends, which is mutually exclusive. Overlap checks always failed. - Premature Range Clearing:
window._currentSpellCheckRangewas cleared immediately after rendering the context menu HTML, so clicking a suggestion had no target range to replace. - The Solution in
ui/menus.js&ui/ui.js: - Implemented
getEditableFromContext(target, container)inui/menus.jsto inspect the target element, container element, caret position range, and active selection. - Preserved
_currentSpellCheckRangewhile the context menu is open, moving cleanup toContextMenuSystem.hide(). - In
ui/ui.js, added fallback range resolution toapplySpellingandapplyGrammarusingwindow.getSelection(). - In
tools/proofing/spellcheck-engine.js, corrected range overlap comparisons toEND_TO_START > 0andSTART_TO_END < 0, and added multi-cache scanning across active editable containers.
π Files Modified in 5.8.7
| File | Changes |
|---|---|
tools/proofing/spellcheck-engine.js |
Trimmed whitespace and eliminated speculative token snapping in createRangeForOffsets. Verified range connection in paintHighlights. Handled contraction expansion and whitespace skipping in checkEditableWithLanguageTool. Fixed overlap boundary comparisons, root editable resolution, and detached range handling in getIssueAt. Header bumped to (v5.8.7). |
ui/menus.js |
Added getEditableFromContext helper to reliably resolve contenteditable elements on text boxes and tables. Extended extractWordFromRange to drill down into text nodes when starting on element nodes. Preserved proofing range for context menu click actions and cleaned up in hide(). Header bumped to (v5.8.7). |
ui/ui.js |
Added fallback range resolution to applySpelling and applyGrammar. |
index.html |
Bumped all 85 script and style cachebusters to ?v=5.8.7. |
sw.js |
Updated Service Worker cache namespace to open-publisher-v5-8-7 and header to (v5.8.7). |
extensions/legacy-fixes.js |
Added header comment (v5.8.7). |
extensions/print-engine.js |
Added header comment (v5.8.7). |
extensions/pwa-install.js |
Bumped header comment to (v5.8.7). |
extensions/ui-interactions.js |
Bumped header comment, console log, and About modal subtitle to v5.8.7. |
ui/sidebar-context.js |
Bumped header comment to (v5.8.7). |
ui/modals/card-sheet-modal.js |
Bumped header comment to (v5.8.7). |
ui/modals/options-modal.js |
Bumped header comment to (v5.8.7). |
core/core.js |
Bumped header comment to (v5.8.7). |
core/boot.js |
Bumped header comment to (v5.8.7). |
wrapper.html was not modified.
β v5.8.7 Verification Checklist
- [x] Grammar Underline Boundary Accuracy: Verified that green wavy highlights strictly match the intended grammar issue tokens without bleeding or shifting into adjacent words.
- [x] Whitespace Trimming: Confirmed that
createRangeForOffsetstrims whitespace and never underlines whitespace or gaps. - [x] Contraction Expansion: Confirmed that contractions like
it'sare highlighted across the full word and replaced cleanly. - [x] Coexisting Spelling & Grammar Issues: Verified that right-clicking a grammar error displays grammar suggestions even when misspelled words exist in the same editable container.
- [x] Point Range Context Menu Triggering: Confirmed that right-clicking whitespace, punctuation, or any token within a multi-word grammar error surfaces the suggestions menu.
- [x] Root Editable Cache Retrieval: Verified that right-clicking inside nested
<span>,<font>, or<div>tags resolves to the root editable for cache lookup. - [x] Suggestion Application: Verified that clicking a grammar or spelling suggestion in the context menu applies the replacement to the document and registers undo history.
- [x] Service Worker & Cachebuster Sync: Verified
sw.jscache name isopen-publisher-v5-8-7and all 85 asset query strings inindex.htmlreference?v=5.8.7. - [x] Subsystem Version Consistency: Confirmed all modified subsystems and modules reflect version 5.8.7.
π Version 5.8.7: Open Publisher