Skip to content

Duplicate data-m values desync the paused-click active tracking — a second paragraph stays highlighted until the next click #269

Description

@maboa

Summary

(As of v2.6.2.) Two interacting details:

  • The binary search's exact-match branch (hyperaudio-lite.js:977-984) breaks at whichever duplicate timestamp it probes first (consumers assign speaker spans the same data-m as the adjacent word — e.g. hyperaudio-lite-editor's editor-core.js:420-426).
  • In setPlayHead's paused-click path (:734-737), active is added to target and target.parentNode directly, but updateTranscriptVisualState only tracks its own computed activeWordElement/activeParentElement (:1039-1054) for later removal.

When the computed active element differs from the clicked target (duplicate timestamps make this routine), the manually-added active on the target's parent is untracked — the delta updater never removes it, leaving a second paragraph highlighted until the next clearActiveClasses() (i.e. the next click).

Fix

Route the paused-click highlight through the tracked fields (set this.activeWordElement/activeParentElement to the target), or bias the binary search to the last element among equal timestamps.

Found reviewing the copy vendored in hyperaudio-lite-editor / GliderMac (2026-07-11).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions