Open doreenbrinkman opened 1 month ago
Here's a codepen version of the repro case: https://codepen.io/jcfranco/pen/ZENpLxd
It looks like this is a Safari browser bug.
As a workaround, you could unset the header/footer z-index used in modal
(see updated example):
calcite-modal {
--calcite-z-index-header: initial;
}
I'll go ahead and label this as blocked until the browser bug is resolved.
cc @geospatialem, @brittneytewks
As a workaround, you could unset the header/footer z-index used in
modal
(see updated example):
I just tried the workaround in our React/Typescript application (sample above, did not try there but in our app) and it flashed the entire dropdown once and went back to just showing the menu cutoff.
Currently, our workaround is it set the placement of the calcite-split-button
dropdown to top-end
so it renders above.
if (isSafari) { const dropdown = target?.shadowRoot?.querySelector("calcite-dropdown"); dropdown?.setAttribute("placement", "top-end"); }`
@doreenbrinkman Would you be able to share more info about dropdown cutoff you're observing?
@doreenbrinkman Following up on our chat, it looks like my workaround wasn't being applied properly because Vite was injecting the styles afterward, which would override it. Would you mind applying the following to your repro case?
diff --git c/src/main.jsx w/src/main.jsx
index d529fa9..7a1d40e 100644
--- c/src/main.jsx
+++ w/src/main.jsx
@@ -23,12 +23,16 @@ ReactDOM.createRoot(document.getElementById("root")).render(
widthScale="s"
open
outsideCloseDisabled
- dismissible>
+ dismissible
+ style={{
+ "--calcite-z-index-header": "initial"
+ }}>
<div slot="header">Safari split button</div>
<div slot="content">Add some content here</div>
<CalciteSplitButton
slot="secondary"
primaryText="Save and leave"
+ overlayPositioning="fixed"
scale="m">
<CalciteDropdownGroup selectionMode="none">
<CalciteDropdownItem>Save and leave</CalciteDropdownItem>
The workaround works using either inline styling or using a class. I forgot to pass in overlayPositioning
fixed to the calcite-split-button
. We are switching to this workaround as it will work with all the browsers. Thanks!
Check existing issues
Actual Behavior
Calcite split-button does not fully display the dropdown items using the Safari browser.
Safari screenshot:![2024-05-24_15-38-07](https://github.com/Esri/calcite-design-system/assets/156362075/de28fa04-179b-4ee2-b4fd-fadee97fc86d)
Chrome screenshot (working):![2024-05-24_15-37-07](https://github.com/Esri/calcite-design-system/assets/156362075/5c51d470-bf6b-41fb-a345-2661a341ae84)
Expected Behavior
All dropdown items are visible
Reproduction Sample
https://github.com/doreenbrinkman/calcite-debug
Reproduction Steps
dore582-safari-dropdown
Reproduction Version
2.8.3
Relevant Info
MacOS Safari 17.4.1
Regression?
No response
Priority impact
impact - p1 - need for current milestone
Impact
The only workaround is to reduce the width of the window and the dropdown items will re-render above. Changing the
overlayPositioning
does not help.Calcite package
Esri team
ArcGIS Online