Skip to content

Use SDT for Reading Mode and Read Aloud#204

Draft
AbeJellinek wants to merge 15 commits into
zotero:masterfrom
AbeJellinek:sdt
Draft

Use SDT for Reading Mode and Read Aloud#204
AbeJellinek wants to merge 15 commits into
zotero:masterfrom
AbeJellinek:sdt

Conversation

@AbeJellinek
Copy link
Copy Markdown
Member

No description provided.

- Entirely missing in PDF (we weren't passing pageIndex, and then it
  was moving away due to the cursor matching a different block)
- Basically nonfunctional in EPUB/snapshot (block-segment map became
  stale)
- Wrong-granularity optimistic highlight
Fixes two highlighting failures that produced "Unable to get range for
CFI" log spam and missing highlights:

- Pass deltaMaps to resolveSelectorMapRange in the cross-path branch so
  NFC-space offsets get translated to original DOM offsets
- Return null from _getExpandedPath when an entry has no text-node
  anchor (e.g., synthetic image alt-text entries). The previous fallback
  to blockAnchor.selectorMap targeted the image element step
  (".../16/2"), and appending character offsets to an element step
  produced unresolvable CFIs like "epubcfi(.../16/2,:0,:16)".

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant