| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| openpublisher5_amd64-windows-portable.exe | 2026-09-28 | 183.2 MB | |
| openpublisher5_amd64-windows.exe | 2026-09-28 | 165.2 MB | |
| openpublisher5_amd64-macos.dmg | 2026-09-28 | 233.1 MB | |
| openpublisher5_amd64-linux.run | 2026-09-28 | 193.4 MB | |
| openpublisher5_amd64-linux.rpm | 2026-09-28 | 215.4 MB | |
| openpublisher5_amd64-linux.flatpak | 2026-09-28 | 153.6 MB | |
| openpublisher5_amd64-linux.deb | 2026-09-28 | 156.2 MB | |
| openpublisher5_amd64-linux.AppImage | 2026-09-28 | 176.6 MB | |
| openpublisher5_amd64-freebsd.pkg | 2026-09-28 | 185.5 MB | |
| 5.1.8_ Lock Aspect Ratio Checkbox Hit-Target Fix source code.tar.gz | 2026-09-28 | 21.5 MB | |
| 5.1.8_ Lock Aspect Ratio Checkbox Hit-Target Fix source code.zip | 2026-09-28 | 21.7 MB | |
| README.md | 2026-09-28 | 4.7 kB | |
| Totals: 12 Items | 1.7 GB | 0 | |
π Summary
Version 5.1.8 resolves an intermittent but reproducible interaction bug in the Picture Tools ribbon tab where the Lock Aspect Ratio checkbox did not behave reliably. Some users found the checkbox itself was not clickable and only the text label to its right activated the toggle; others reported the exact opposite - the checkbox clicked fine but the text label did nothing. The underlying cause was the same in both cases: a JavaScript double-toggle race condition caused by mixing a manual div onclick toggle with the browser's own native checkbox toggle.
π Root Cause Analysis
The original implementation wrapped the checkbox and its text label in a plain <div> with an onclick handler that manually flipped cb.checked and called ContextRibbonActions.toggleAspectLock():
:::html
<!-- OLD - broken -->
<div onclick="const cb = document.getElementById('ribbon-el-lock');
cb.checked = !cb.checked;
ContextRibbonActions.toggleAspectLock(cb.checked);">
<input type="checkbox" id="ribbon-el-lock"
onchange="ContextRibbonActions.toggleAspectLock(this.checked);
event.stopPropagation();">
<span>Lock aspect ratio</span>
</div>
When the user clicked the checkbox directly:
- The browser natively toggled
checked(e.g.,falsetotrue). - The
onchangefired, callingtoggleAspectLock(true)- correct so far. event.stopPropagation()was called on thechangeevent - but this does not stop the parentdiv'sclickevent from firing, becauseclickandchangeare separate event types.- The parent
divonclickthen fired, callingcb.checked = !cb.checked(toggling it back tofalse) and calledtoggleAspectLock(false). - Net result: the checkbox appeared to do nothing (toggled twice, back to its original state).
When the user clicked the text span:
- No native checkbox toggle occurred.
- Only the
divonclickfired, performing one toggle - which worked correctly.
The exact symptom (checkbox broken vs. text broken) varied between users depending on subtle browser differences in event propagation timing and whether event.stopPropagation() affected the outer click in their browser version.
π οΈ Fix
The fix replaces the div + onclick pattern with a standard HTML <label> element using the for attribute. This is the correct, browser-native mechanism for associating a label with a checkbox:
:::html
<!-- NEW - correct -->
<label for="ribbon-el-lock"
style="display:flex; align-items:center; margin-top:2px;
cursor:pointer; user-select:none;">
<input type="checkbox" id="ribbon-el-lock"
style="margin:0 4px 0 0; cursor:pointer;
accent-color: var(--ui-theme-color);"
onchange="ContextRibbonActions.toggleAspectLock(this.checked);">
<span class="ribbon-mini-label"
style="user-select:none; cursor:pointer;">Lock aspect ratio</span>
</label>
Why this works reliably:
- Clicking anywhere within the
<label>(the checkbox itself, the text, or any gap between them) triggers exactly one native toggle of the associated<input>. - No JavaScript is involved in the toggle mechanism - the browser handles it natively and correctly.
onchangefires once per user interaction, callingtoggleAspectLockexactly once with the new state.- The redundant manual
cb.checked = !cb.checkedandevent.stopPropagation()are eliminated entirely.
π§ͺ Verification
The fix was verified by inspecting the event flow:
| Click target | Old behavior | New behavior |
|---|---|---|
| Checkbox box | Toggle fired twice (no-op) | Toggle fired once (correct) |
| Label text | Toggle fired once (correct) | Toggle fired once (correct) |
| Gap between | Toggle fired once (correct) | Toggle fired once (correct) |
β Checklist Completed
- [x]
ui/ui.js: Replaced<div onclick>wrapper with<label for="ribbon-el-lock">in the Picture Tools size group, eliminating the double-toggle race condition. - [x]
ui/ui.js: Removed redundantevent.stopPropagation()from the checkboxonchangehandler (no longer needed without the conflicting parentonclick). - [x]
index.html: Bumped all script, stylesheet, and asset cachebusters from?v=5.1.7to?v=5.1.8. - [x]
ui/dashboard.js: Bumped template index fetch from?v=5.1.7to?v=5.1.8.
π Version 5.1.8 - Open Publisher