Skip to content

Develop - #335

Merged
namedgraph merged 9 commits into
masterfrom
develop
Aug 6, 2026
Merged

Develop#335
namedgraph merged 9 commits into
masterfrom
develop

Conversation

@namedgraph

Copy link
Copy Markdown
Member

No description provided.

namedgraph and others added 9 commits August 2, 2026 19:24
# Conflicts:
#	CHANGELOG.md
Vendored from RDFa-Editor: rdfae:show-overlay now rebuilds the overlay via
rdfae:init-overlay when it is absent. Fixes the SaxonJS cardinality crash on
the second right-click annotation after the first dialog was dismissed —
LDH styles the overlay as a Bootstrap .modal, so its generic modal teardown
(close button / Escape) deletes the render-once singleton from the DOM.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- ldh:form-horizontal-submit-success calls rdfae:hide-overlay so the annotation
  overlay does not linger once the editor reverts to read-only.
- Click-to-edit now places the caret at the clicked word: block.xsl captures a
  structural anchor at click (content-block index + character offset within it,
  via a Range), and ldh:focus-editable re-resolves it against the editor DOM
  (ldh:text-position walks the block's non-chrome text to that offset). Pixel/
  coordinate approaches were unreliable because the read and edit views are
  separate DOMs that re-render and shift; the structural anchor is immune to that.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ataHub

The editor's inline drag handle (rdfae:inject-chrome) carried class="drag-handle",
which collided with bootstrap.css's `.row-fluid.block .drag-handle { display: none }`
and hid every handle rendered in an edited ldh:XHTML block. Override inject-chrome
LDH-side (edit.xsl untouched) to stamp an editor-specific `rdfa-editor-drag-handle`
class and re-match the two drag gestures; reserve the handle gutter with padding-left
on .rdfa-editor-content (the host requirement the editor documents).

LDH's own document-block drag-and-drop handlers matched every element inside
.rdfa-editor-content (the editor renders in a .content-body > .block) and, having
higher import precedence than the imported edit.xsl, shadowed the editor's own block
DnD - killing its drop marks and reorder. Exclude the editor subtree from the four
handlers (ondragover/enter/leave/drop) so those events fall through to the editor.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…save)

Exiting the editor canvas fired two identical PATCHes for one gesture:
onfocusout (mousedown) saved successfully with 204 and rotated the graph
ETag, then the onclick-outside handler (mouseup, ~75ms later) resubmitted
with the now-stale If-Match and got 412. If-Match was working correctly -
it caught a self-inflicted double-write.

The canvas holds focus throughout editing (toolbar/breadcrumb/find chrome
all preventDefault on mousedown to keep it), so focusout reliably fires on
any exit click and already carries the save. Remove the redundant
onclick-outside template; onfocusout is now the single exit/save trigger.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@namedgraph
namedgraph merged commit b85448c into master Aug 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant