Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dialog, modal, sheet): preserve focus-trap extra containers across internal trap updates #11548

Conversation

jcfranco
Copy link
Member

@jcfranco jcfranco commented Feb 14, 2025

Related Issue: #11523

Summary

Internal calls to updateFocusTrap caused user-provided extraContainers to be lost. This updates useFocusTrap to maintain stateful focusable containers for subsequent updates.

@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Feb 14, 2025
@jcfranco jcfranco added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Feb 14, 2025
Copy link
Member

@benelan benelan left a comment

Choose a reason for hiding this comment

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

Code LGTM but would it be feasible to add spec coverage? If so, it can be in a follow up PR too.

@jcfranco
Copy link
Member Author

Yeah, I'm planning to cover all controller testing in #11305.

@jcfranco jcfranco merged commit 4f9c448 into dev Feb 14, 2025
17 checks passed
@jcfranco jcfranco deleted the jcfranco/11523-keep-track-of-extra-containers-on-internal-focus-trap-container-updates branch February 14, 2025 01:31
@github-actions github-actions bot added this to the 2025-02-25 - Feb Milestone milestone Feb 14, 2025
benelan pushed a commit that referenced this pull request Feb 14, 2025
…s internal trap updates (#11548)

**Related Issue:** #11523 

## Summary

Internal calls to `updateFocusTrap` caused user-provided
`extraContainers` to be lost. This updates `useFocusTrap` to maintain
stateful focusable containers for subsequent updates.
benelan pushed a commit that referenced this pull request Feb 14, 2025
…s internal trap updates (#11548)

**Related Issue:** #11523 

## Summary

Internal calls to `updateFocusTrap` caused user-provided
`extraContainers` to be lost. This updates `useFocusTrap` to maintain
stateful focusable containers for subsequent updates.
benelan pushed a commit that referenced this pull request Feb 14, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>@esri/calcite-components: 3.0.1</summary>

##
[3.0.1](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected])
(2025-02-14)


### Bug Fixes

* **dialog, modal, sheet:** Preserve focus-trap extra containers across
internal trap updates
([#11548](#11548))
([4e421b7](4e421b7))
* **input-date-picker:** Allow navigating between months using chevron
actions in Safari
([#11547](#11547))
([9b8c02e](9b8c02e))
* **list, block-group:** Drag menu 'Move to' actions broken when list
elements have explicit ids
([#11515](#11515))
([e0daf83](e0daf83))
</details>

<details><summary>@esri/calcite-components-react: 3.0.1</summary>

##
[3.0.1](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected])
(2025-02-14)


### Miscellaneous Chores

* **@esri/calcite-components-react:** Synchronize components versions


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from 3.0.0 to 3.0.1
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
benelan pushed a commit that referenced this pull request Feb 14, 2025
🤖 I have created a release *beep* *boop*
---

<details><summary>@esri/calcite-components: 3.0.1</summary>

[3.0.1](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected])
(2025-02-14)

* **dialog, modal, sheet:** Preserve focus-trap extra containers across
internal trap updates
([#11548](#11548))
([4e421b7](4e421b7))
* **input-date-picker:** Allow navigating between months using chevron
actions in Safari
([#11547](#11547))
([9b8c02e](9b8c02e))
* **list, block-group:** Drag menu 'Move to' actions broken when list
elements have explicit ids
([#11515](#11515))
([e0daf83](e0daf83))
</details>

<details><summary>@esri/calcite-components-react: 3.0.1</summary>

[3.0.1](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected])
(2025-02-14)

* **@esri/calcite-components-react:** Synchronize components versions

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from 3.0.0 to 3.0.1
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
benelan added a commit that referenced this pull request Feb 14, 2025
🤖 I have created a release *beep* *boop*

---

<details><summary>@esri/calcite-components: 3.0.1</summary>


[3.0.1](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected])
(2025-02-14)

* **dialog, modal, sheet:** Preserve focus-trap extra containers across
internal trap updates
([#11548](#11548))

([4e421b7](4e421b7))
* **input-date-picker:** Allow navigating between months using chevron
actions in Safari
([#11547](#11547))

([9b8c02e](9b8c02e))
* **list, block-group:** Drag menu 'Move to' actions broken when list
elements have explicit ids
([#11515](#11515))

([e0daf83](e0daf83))
</details>

<details><summary>@esri/calcite-components-react: 3.0.1</summary>


[3.0.1](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected])
(2025-02-14)

* **@esri/calcite-components-react:** Synchronize components versions

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from 3.0.0 to 3.0.1
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See

[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: Calcite Admin <[email protected]>
jcfranco added a commit that referenced this pull request Feb 14, 2025
…containers to be lost after internal trap updates (#11556)

**Related Issue:** #11523 

## Summary

#11548 missed calling
the internal update focus trap method, using the public method instead,
which clears user-specified `extraContainers`.
benelan pushed a commit that referenced this pull request Feb 14, 2025
…containers to be lost after internal trap updates (#11556)

**Related Issue:** #11523 

## Summary

#11548 missed calling
the internal update focus trap method, using the public method instead,
which clears user-specified `extraContainers`.
benelan pushed a commit that referenced this pull request Feb 14, 2025
…containers to be lost after internal trap updates (#11556)

**Related Issue:** #11523 

## Summary

#11548 missed calling
the internal update focus trap method, using the public method instead,
which clears user-specified `extraContainers`.
benelan added a commit that referenced this pull request Feb 17, 2025
* origin/dev: (171 commits)
  chore(tip-manager): drop empty spec test (#11568)
  chore: release next
  feat(chip): enhance component's interactivity states (#11538)
  chore: release next
  fix(tooltip): close tooltips on prevented pointer move events (#11557)
  chore: release main (#11561)
  chore: release next
  revert: build(deps): update arcgis to ^4.33.0-next.13 (#11539) (#11559)
  fix(dialog, modal, popover, sheet): fixes an issue that caused extra containers to be lost after internal trap updates (#11556)
  chore: release main (#11551)
  build(deps): update arcgis to ^4.33.0-next.13 (#11539)
  chore: release next
  fix(input-date-picker): allow navigating between months using chevron actions in Safari (#11547)
  chore: release next
  fix(dialog, modal, sheet): preserve focus-trap extra containers across internal trap updates (#11548)
  chore: release next
  feat(segmented-control-item): enhance component's interactivity states (#11477)
  chore: release next
  refactor: drop deprecated loadable component utilities (#11479)
  docs: link to package readmes from root readme (#11531)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug. pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants