Repository navigation
fix(design-system): preserve iframe shield across concurrent resizers - #533
Merged
tornado-softwares merged 2 commits intoNov 2, 2026
Conversation
…lict in iframe pointer shield Keep a module-level WeakMap with a reference count of holding instances per iframe. Each hook instance acquires the shield claim at most once, so repeated disable calls are no-ops; on restore, each captured iframe's reference count is decremented and its original inline pointer-events is restored only when the count drops to zero. Cover edge cases with regression tests: duplicate disable/restore calls, concurrent instances with out-of-order and unmount releases, re-acquiring while another instance still holds, distinct initial inline values, and iframe DOM detachment during interactions.
| - [Configuration](https://intlayer.org/doc/concept/configuration.md) | ||
|
|
||
| ### Packages | ||
|
|
| /** | ||
| * Module-level registry tracking iframes shielded by active drag interactions. | ||
| * | ||
| * WeakMap ensures that if an iframe element is garbage collected, its entry |
tornado-softwares
approved these changes
Nov 2, 2026
tornado-softwares
left a comment
Collaborator
There was a problem hiding this comment.
Sounds good to me! Good to merge, @aymericzip
Collaborator
|
Thanks for taking the time to fix the issue I mentioned, even after your previous PR had already been merged. And thanks more generally for your contribution @yangguan-xue !! |
Owner
|
Hey @yangguan-xue @tornado-softwares I confirm that the changes fixed the issue, thanks both! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #531, addressing the duplicate disable and concurrent instance review comments.
Repeated disables on the same hook instance are ignored. Different instances share a WeakMap reference count, so each iframe's original pointer-events value is restored only when the last instance releases its claim.
Adds 10 regression tests covering duplicate calls, both release orders, re-acquisition, unmount cleanup and detached iframes.
Validation: design-system build and typecheck passed; 49 test files passed (357 tests passed, 1 skipped); Biome passed for both changed files.