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

[split-button] Drop down items do not fully display using Safari #9419

Open
2 of 6 tasks
doreenbrinkman opened this issue May 24, 2024 · 13 comments
Open
2 of 6 tasks
Labels
0 - new New issues that need assignment. ArcGIS Online Issues logged by ArcGIS Online team members. blocked This issue is blocked by another issue. browser-safari Issues tied to the last 2 versions of Safari browser. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components-react Issues specific to the @esri/calcite-components-react package. has workaround Issues have a workaround available in the meantime. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone p - low Issue is non core or affecting less that 10% of people using the library spike complete Issues that have a research spike completed and dev work can proceed
Milestone

Comments

@doreenbrinkman
Copy link

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

Chrome screenshot (working):
2024-05-24_15-37-07

Expected Behavior

All dropdown items are visible

Reproduction Sample

https://github.com/doreenbrinkman/calcite-debug

Reproduction Steps

  1. Clone the reproduction sample and checkout the branch dore582-safari-dropdown
  2. Run the app

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/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Online

@doreenbrinkman doreenbrinkman added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels May 24, 2024
@github-actions github-actions bot added impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone calcite-components-react Issues specific to the @esri/calcite-components-react package. ArcGIS Online Issues logged by ArcGIS Online team members. labels May 24, 2024
@geospatialem
Copy link
Member

geospatialem commented May 28, 2024

Related #8028

@geospatialem geospatialem added browser-safari Issues tied to the last 2 versions of Safari browser. spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. and removed needs triage Planning workflow - pending design/dev review. labels May 28, 2024
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. has workaround Issues have a workaround available in the meantime. and removed 0 - new New issues that need assignment. labels May 28, 2024
@jcfranco
Copy link
Member

jcfranco commented Jun 4, 2024

Here's a codepen version of the repro case: https://codepen.io/jcfranco/pen/ZENpLxd

@jcfranco
Copy link
Member

jcfranco commented Jun 7, 2024

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.

@jcfranco jcfranco added spike complete Issues that have a research spike completed and dev work can proceed blocked This issue is blocked by another issue. labels Jun 7, 2024
@github-actions github-actions bot added 0 - new New issues that need assignment. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. 1 - assigned Issues that are assigned to a sprint and a team member. labels Jun 7, 2024
Copy link
Contributor

github-actions bot commented Jun 7, 2024

cc @geospatialem, @brittneytewks

@github-actions github-actions bot removed this from the 2024-06-25 - Jun Release milestone Jun 7, 2024
@jcfranco jcfranco added this to the Freezer milestone Jun 7, 2024
@doreenbrinkman
Copy link
Author

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");
}`

@jcfranco
Copy link
Member

jcfranco commented Jun 7, 2024

@doreenbrinkman Would you be able to share more info about dropdown cutoff you're observing?

@jcfranco
Copy link
Member

@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>

@doreenbrinkman
Copy link
Author

doreenbrinkman commented Jun 11, 2024

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!

@geospatialem geospatialem added spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. and removed spike complete Issues that have a research spike completed and dev work can proceed labels Sep 10, 2024
@geospatialem
Copy link
Member

Spike to determine if the Safari bug fix mitigates, and/or if further action is needed, or we need to push out once Safari has been mitigated.

@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. labels Sep 10, 2024
@DitwanP
Copy link
Contributor

DitwanP commented Sep 20, 2024

It doesn't seem to have been mitigated as I still see the same bugged behavior listed in the issue and from Franco's repro that he posted on the safari bug report.

image
image

@DitwanP DitwanP added spike complete Issues that have a research spike completed and dev work can proceed and removed spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. labels Sep 20, 2024
@github-actions github-actions bot added 0 - new New issues that need assignment. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Sep 20, 2024
Copy link
Contributor

cc @geospatialem, @brittneytewks

@geospatialem geospatialem added this to the Stalled milestone Sep 20, 2024
@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Sep 20, 2024
@geospatialem
Copy link
Member

Added as blocked by the Safari bug Franco mentioned above and since there is a workaround (in the same comment linked) adding in the p - low label based on the Safari bug effort, which has been open since 2016.

@geospatialem geospatialem added the p - low Issue is non core or affecting less that 10% of people using the library label Sep 20, 2024
@doreenbrinkman
Copy link
Author

Not seeing this issue after converting calcite-modal to calcite-dialog so that is also a workaround.
https://codepen.io/doreenbrinkman/pen/wvVNdjV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Online Issues logged by ArcGIS Online team members. blocked This issue is blocked by another issue. browser-safari Issues tied to the last 2 versions of Safari browser. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components-react Issues specific to the @esri/calcite-components-react package. has workaround Issues have a workaround available in the meantime. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone p - low Issue is non core or affecting less that 10% of people using the library spike complete Issues that have a research spike completed and dev work can proceed
Projects
None yet
Development

No branches or pull requests

4 participants