Repository navigation
Conversation
A trigger that mounts while a popup is already open (via a handle's openWithPayload/open(null)) would claim ownership and overwrite the programmatic payload. Track openedWithoutTrigger in the popup store and skip the implicit, registration-time, and single-trigger ARIA (aria-controls) claim paths for such opens; reset the flag on close so a later non-imperative open (controlled/defaultOpen) isn't affected. DialogHandle.open records trigger intent so handle.open(id) before mount still associates. Adds regression tests for payload preservation and the absent ARIA association. (B5)
- Aggregate nested dialog/drawer counts per child (keyed by a stable id, via Math.max) so closing one sibling no longer zeroes the parent while another stays open, which also fixes Escape/outside-press topmost gating (B4). - Accept touchend outside-press by counting changedTouches instead of the now-empty touches list (B6). - Seed store state directly on first render instead of store.update() so detached trigger subscribers aren't notified mid-render (B7). - Seed a reused handle store's openProp on first render so an initially-open dialog doesn't play an enter transition (B8). - Report the trigger on close using the triggerIdProp-aware selector (B9). - Add a nested sibling-close regression test.
- Drop the redundant mergeProps(FOCUSABLE_POPUP_PROPS, dismiss.floating); both popup consumers already spread FOCUSABLE_POPUP_PROPS (S4). - Extract the shared touch default-initial-focus resolver into createDefaultInitialFocus, used by Dialog and Popover popups (S5). - Return void from useDialogRoot, pass parentContext/isDrawer to DialogInteractions directly, and drop the dead UseDialogRoot* interfaces and eventTarget alias (S7). - Add a default touch initialFocus regression test.
- disablePointerDismissal: describe what it actually does (prevent closing on outside press, plus focus-out for non-modal); the old text was inverted (C1). - actionsRef: the unmount action requires eventDetails.preventUnmountOnClose() in onOpenChange, not merely providing the ref (C2). - DialogTrigger state: 'disabled' reflects the trigger; 'open' is true only when this trigger opened the dialog (C5, C6). - DialogPopup initialFocus/finalFocus: document the null fallback and the touch default (C7). - Document createAlertDialogHandle (C13). - Regenerate the API reference.
commit: |
Bundle size
PerformanceTotal duration: 1,225.19 ms -229.06 ms(-15.8%) | Renders: 50 (+0) | Paint: 1,852.02 ms -332.37 ms(-15.2%)
10 tests within noise — details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
|
Superseded by #5036, which fixes the same JSDoc rot across all components instead of just Dialog/AlertDialog. |
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.
Corrects inaccurate public prop JSDoc (regenerated API reference included):
disablePointerDismissal— the description was inverted (and omitted that for non-modal dialogs it also disables closing on focus-out).actionsRef— theunmountaction requires callingeventDetails.preventUnmountOnClose()fromonOpenChange; specifying the ref alone no longer prevents unmount.Dialog.Triggerstate —disabledreflects the trigger (not the dialog);openis true only when the dialog is open and was opened by that trigger.Dialog.PopupinitialFocus/finalFocus— document thenull-fallback and the touch default (the popup itself is focused on touch).createAlertDialogHandle.