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

bug: Card border radius overflows in Safari 16 #26529

Closed
4 of 7 tasks
cperezabo opened this issue Dec 21, 2022 · 8 comments
Closed
4 of 7 tasks

bug: Card border radius overflows in Safari 16 #26529

cperezabo opened this issue Dec 21, 2022 · 8 comments
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@cperezabo
Copy link

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

ion-card content is overflowing in Safari using Ionic 6.3.x or newer. It started happening after updating from Ionic 6.1.4, it worked as expected using that version.

CleanShot 2022-12-21 at 19 14 06@2x

Expected Behavior

Should hide overflow.

CleanShot 2022-12-21 at 19 15 09@2x

Steps to Reproduce

Create a blank project with an Ionic 6.3.x or newer version and put an ion-list inside an ion-card

<ion-card>
    <ion-list>
        <ion-item>Hello</ion-item>
    </ion-list>
</ion-card>

Code Reproduction URL

No response

Ionic Info

Ionic:

   Ionic CLI                     : 6.20.3 (/Users/cristian/.config/yarn/global/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.3.0
   @angular-devkit/build-angular : 14.2.5
   @angular-devkit/schematics    : 13.2.6
   @angular/cli                  : 14.2.5
   @ionic/angular-toolkit        : 6.1.0

Capacitor:

   Capacitor CLI      : 3.4.3
   @capacitor/android : not installed
   @capacitor/core    : 3.4.3
   @capacitor/ios     : not installed

Utility:

   cordova-res                          : not installed globally
   native-run (update available: 1.7.1) : 1.5.0

System:

   NodeJS : v16.17.1 (/Users/cristian/.nodenv/versions/16.17.1/bin/node)
   npm    : 8.15.0
   OS     : macOS

Additional Information

I haven't tried other versions of Ionic, I updated my project from 6.1.4 to 6.3.0 and it started happening. It also happens with Ionic 6.4.0 too.
I tried in Brave and Safari and it works as expected.
It seams to be Safari-only bug, but it breaks my PWA on mobile.

@ionitron-bot ionitron-bot bot added the holiday triage issues that were created during holiday period label Dec 21, 2022
@ionitron-bot
Copy link

ionitron-bot bot commented Dec 21, 2022

Thanks for the issue! This issue has been labeled as holiday triage. With the winter holidays quickly approaching, much of the Ionic Team will soon be taking time off. During this time, issue triaging and PR review will be delayed until the team begins to return. After this period, we will work to ensure that all new issues are properly triaged and that new PRs are reviewed. In the meantime, please read our Winter Holiday Triage Guide for information on how to ensure that your issue is triaged correctly. Thank you!

@sean-perkins
Copy link
Contributor

@cperezabo thanks for reporting this issue.

Can you modify this reproduction to isolate the problem: https://stackblitz.com/edit/angular-cnclwc-yhx4lf?file=src%2Fapp%2Fexample.component.html

Testing with Safari Web Version 15.5 (17613.2.7.1.8) and the latest version of Ionic (6.4.1) I am not seeing overflowing contents based on the code snippet provided.

@sean-perkins sean-perkins added the needs: reply the issue needs a response from the user label Dec 22, 2022
@ionitron-bot ionitron-bot bot removed the holiday triage issues that were created during holiday period label Dec 22, 2022
@cperezabo
Copy link
Author

I just opened your example and 💥

image

The problem is you are using an old Safari. I'm using current v16.2

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Dec 23, 2022
@sean-perkins
Copy link
Contributor

Thanks for the extra detail @cperezabo, I am able to reproduce once updating to Safari v16.2.

As a workaround you can assign this styling to the item:

ion-item {
  overflow: inherit;
}

I need to isolate the reproduction to report to the Webkit team before determining the appropriate resolution for Ionic Framework.

@sean-perkins sean-perkins self-assigned this Dec 23, 2022
@cperezabo
Copy link
Author

cperezabo commented Dec 23, 2022

I've tried to use the styles you suggest with no luck. It doesn't even work with !important.

I placed the style in global.scss

ion-item {
  overflow: inherit !important;
}

The dirty workaround I found was to use the following styles

ion-card {
  > ion-list.ios {
    border-radius: 8px;
  }

  > ion-list.md {
    border-radius: 4px;
  }
}

@sean-perkins
Copy link
Contributor

sean-perkins commented Dec 27, 2022

@cperezabo can you test with this dev-build: 6.4.2-dev.11672163551.15de10fd?

Forked stackblitz with the dev-build: https://stackblitz.com/edit/angular-cnclwc-4myqzy

I was unable to narrow a reproduction to reproduce the issue from Safari 15 → 16 for the Webkit team. However, I was able to diagnose that contain: paint is the offending styles once updating to Safari 16. The ion-list bounding box flows outside of the ion-card, causing a painting issue with the border radius initially. Assigning contain: content on the ion-card host resolve this.

@cperezabo
Copy link
Author

Interesting!.
I can confirm this is working as expected 🎉

@sean-perkins sean-perkins changed the title bug: card overflow not hiding in Safari bug: Card border radius overflows in Safari 16 Dec 28, 2022
@sean-perkins sean-perkins added package: core @ionic/core package type: bug a confirmed bug report and removed triage labels Dec 28, 2022
@sean-perkins sean-perkins removed their assignment Dec 29, 2022
@ionitron-bot
Copy link

ionitron-bot bot commented Mar 23, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

2 participants