Skip to content

fix(joint-react): stop guarding events targeting paper container itself - #3476

Merged
kumilingus merged 1 commit into
clientIO:masterfrom
zbynekstara:paper-portal-fix
Aug 21, 2026
Merged

fix(joint-react): stop guarding events targeting paper container itself#3476
kumilingus merged 1 commit into
clientIO:masterfrom
zbynekstara:paper-portal-fix

Conversation

@zbynekstara

Copy link
Copy Markdown
Contributor

Description

Fixes the paper preset's guardExplicit override treating paper.el itself as portaled content (because Node.contains() is true for the node itself, so the check meant for descendants also caught the root element, guarding it before joint-core's guard() could reach its this.el === target exemption).

Adds regression tests for the boundary; real portaled content stays guarded.

Motivation and Context

This fixes a failing test in joint-react-plus.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes React Paper event guarding so events targeting the paper container itself reach JointJS while portaled descendants remain guarded.

Changes:

  • Excludes paper.el from portaled-content detection.
  • Adds regression tests for container events and wheel panning.
  • Adds an @joint/react patch changeset.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/joint-react/src/presets/paper.ts Corrects event target guarding.
packages/joint-react/src/components/paper/__tests__/paper-html-content-events.test.tsx Adds regression coverage.
.changeset/lucky-pans-listen.md Documents the patch release.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@kumilingus
kumilingus merged commit 20aa3e2 into clientIO:master Aug 21, 2026
3 checks 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.

3 participants