You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
For example, in paratext-registration.web-view.tsx, TJ had to bump the z-index up to 250 to get over the floating web view z-index 200. I had to do the same for the Interface Language selector. This likely means that extension developers will also find themselves running up against this problem and wasting time trying to figure out the "right" solution. If we don't make it easy to get this to work correctly, we're likely to get bombarded by complaints, waste time, encounter potentially detrimental hacky solutions, and have harder to maintain code.
To Reproduce
To illustrate the problem, remove the style={{ zIndex: 250 }} hack from either paratext-registration.web-view.tsx or ui-language-selector.component.tsx
Expected behavior
All "dropdowns" (in a Select, a combo box, a multi-select combobox, etc.) should naturally and effortlessly appear on top of their surrounding content, regardless of whether they are in a tab, a dialog, a floating window, or in a circular gammaflexed black hole on the moon.
Notes
I tried modifying the shadcn SelectPrimitive.Content, changing tw-z-50 to tw-z-250. Interestingly, that fixed the problem in paratext-registration.web-view.tsx but not in ui-language-selector.component.tsx. In the case of the latter, the style showed as being applied in the DOM, but the z-index showed as auto. Not sure why. If something like this could be made to work, it might be the solution, but we'd need to see if similar tweaks were needed in other controls that use portals with a z-index of 50 (e.g., DropdownMenuPrimitive.Portal, PopoverPrimitive.Portal).
The text was updated successfully, but these errors were encountered:
I also had this problem with our ComboBox that uses Popover underneath.
tjcouch-sil
changed the title
Without "heroics" dropdowns (e.g., SelectContent portal) can appear behind a control's parent window(s)
Dropdowns (e.g., SelectContent portal) appear behind a control's parent window(s) by default
Dec 10, 2024
The preview app example code for the UI Language Selector will nicely illustrate the problem, so all you have to do to see it is comment out the little hack in src\components\advanced\ui-language-selector.component.tsx
Description
For example, in paratext-registration.web-view.tsx, TJ had to bump the z-index up to 250 to get over the floating web view z-index 200. I had to do the same for the Interface Language selector. This likely means that extension developers will also find themselves running up against this problem and wasting time trying to figure out the "right" solution. If we don't make it easy to get this to work correctly, we're likely to get bombarded by complaints, waste time, encounter potentially detrimental hacky solutions, and have harder to maintain code.
To Reproduce
To illustrate the problem, remove the
style={{ zIndex: 250 }}
hack from either paratext-registration.web-view.tsx or ui-language-selector.component.tsxExpected behavior
All "dropdowns" (in a Select, a combo box, a multi-select combobox, etc.) should naturally and effortlessly appear on top of their surrounding content, regardless of whether they are in a tab, a dialog, a floating window, or in a circular gammaflexed black hole on the moon.
Notes
I tried modifying the shadcn SelectPrimitive.Content, changing tw-z-50 to tw-z-250. Interestingly, that fixed the problem in paratext-registration.web-view.tsx but not in ui-language-selector.component.tsx. In the case of the latter, the style showed as being applied in the DOM, but the z-index showed as auto. Not sure why. If something like this could be made to work, it might be the solution, but we'd need to see if similar tweaks were needed in other controls that use portals with a z-index of 50 (e.g., DropdownMenuPrimitive.Portal, PopoverPrimitive.Portal).
The text was updated successfully, but these errors were encountered: