Skip to content

Commit 33926e7

Browse files
committed
fix case where user navigates to Picker page from another page
1 parent 8d1be11 commit 33926e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/@react-aria/collections/src/Hidden.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ if (typeof HTMLTemplateElement !== 'undefined') {
6666
enumerable: true,
6767
value: function (node, child) {
6868
if (this.dataset.reactAriaHidden) {
69+
// child might not exist in this.content for some reason (stale?), add to end instead
70+
if (child && !this.content.contains(child)) {
71+
return this.content.appendChild(node);
72+
}
6973
return this.content.insertBefore(node, child);
7074
} else {
7175
return originalInsertBefore.call(this, node, child);

0 commit comments

Comments
 (0)