Commit Graph
2 Commits
Author SHA1 Message Date
FredApps 1771844b84 fix(link-js): address the review on the #2081 port
- A link that fails puts the realm's timers back as they were before its
  own script ran, and turns no layer: timers it set are dropped, timers it
  cleared come back (timers::save/restore in Realm::run_job).
- In a read-only document a link's requests still apply when its field
  changes can't; the outcome carries the read-only error.
- app.openDoc during a calculation (calculateNow) is noted on the console
  and not queued, as for a field script running on its own.
- Link script streams are decoded once per stream, whatever their source
  length, and /Filter [] reads as the raw source.
- The web build sets the view's zoom, page and highlight before a link
  script runs, as the desktop does.
2026-11-13 18:48:33 +01:00
FredAppsandLMatt08 52ca67c8c4 engine: run a link's JavaScript action in the document realm
Ported from #2081: Session::run_link_javascript / start_link_javascript run a link's action as
event Link/Mouse Up on its page, with the document as target, in the per-document
ScriptSession; a failed link commits no field change or request; read-only documents' links
run too. Field scripts may not open another document; resolve_javascript_document_path
resolves openDoc paths as remote-link paths (Acrobat /C/... paths on Windows).

Co-authored-by: LMatt08 <245691047+LMatt08@users.noreply.github.com>
2026-11-11 12:43:21 +01:00