Skip to content

Commit 06503e2

Browse files
Revise version history for v12.0 and date correction
Updated version history with new version details and fixed dates.
1 parent d0062ef commit 06503e2

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

JavaCodeVisualizer_VersionHistory.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Java Code Visualizer — Version History
22

3-
## Development Timeline (May 23–24, 2026)
3+
## Development Timeline (May 23–28, 2026)
44

55
This document lists every version of `JavaCodeVisualizer.jsx` produced during the iterative development process, along with the changes made in each version.
66

@@ -146,7 +146,7 @@ Changed the code font to Fira Code and increased size.
146146

147147
---
148148

149-
### v11.0 (Final) — Cursor Alignment Fix
149+
### v11.0 — Cursor Alignment Fix
150150
**Lines:** ~2,931 | **Date:** May 24, 2026
151151

152152
Fixed cursor misalignment after font size increase.
@@ -158,6 +158,23 @@ Fixed cursor misalignment after font size increase.
158158

159159
---
160160

161+
### v12.0 (Final) — Copy/Selection Fix (Native Selection Restored)
162+
**Lines:** ~2,901 | **Date:** May 28, 2026
163+
164+
Fixed word-level copy not working — selecting a single word was highlighting the entire line and copying the full line content.
165+
166+
- **Root cause** — The custom line-level selection system (introduced in v6.0) highlighted entire lines when any text on that line was selected. The native textarea `::selection` was hidden (`background: transparent`), so users couldn't see or copy individual words
167+
- **Native textarea selection restored**`::selection` changed from `transparent` back to `rgba(56,139,253,0.3)` with `color: transparent`, enabling proper character/word-level selection highlighting
168+
- **Custom selection system removed:**
169+
- Removed `selRange` state and `handleSelect` callback
170+
- Removed `isSelected` variable from overlay line rendering
171+
- Removed `onSelect`, `onMouseUp`, `onKeyUp` event handlers from textarea
172+
- Removed line-level selection background color logic from overlay
173+
- **Why this works now** — The cursor alignment fixes from v11.0 (ligature disabling, font sync, explicit font rendering) mean the native textarea selection now aligns properly with the visible overlay code, making the custom system unnecessary
174+
- Double-click to select a word, drag to select partial text, and Cmd/Ctrl+C copies exactly what is selected
175+
176+
---
177+
161178
## Summary Table
162179

163180
| Version | Key Change | Lines |
@@ -173,3 +190,4 @@ Fixed cursor misalignment after font size increase.
173190
| v9.0 | Java logo icon (base64 embedded) | ~2,860 |
174191
| v10.0 | Fira Code font, 16px size, 28px line height | ~2,921 |
175192
| v11.0 | Cursor alignment fix (ligatures disabled, font sync) | ~2,931 |
193+
| v12.0 | Copy/selection fix (native selection restored) | ~2,901 |

0 commit comments

Comments
 (0)