ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: webkit iOS 17, animation flicker

Open moerphie opened this issue 1 year ago β€’ 2 comments

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

Dismissing the modal triggers a flicker, perhaps the backdrop? It only occurs irregularly. Never in Chrome, Safari rarely, iOS Simulator more often.

https://github.com/ionic-team/ionic-framework/assets/12500071/9ba93b9f-0598-4b3b-b465-ff894ecd98e5

Expected Behavior

No flicker expected

Steps to Reproduce

  1. Clone this repo: https://github.com/moerphie/ionic-modal-flicker
  2. yarn run install && yarn run dev
  3. Launch iOS Simulator and open/dismiss modal

Code Reproduction URL

https://github.com/moerphie/ionic-modal-flicker

Ionic Info

Ionic:

Ionic CLI : 7.1.1 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/vue 7.5.3

Capacitor:

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

Utility:

cordova-res : not installed globally native-run (update available: 2.0.0) : 1.7.4

System:

NodeJS : v16.17.0 (/usr/local/bin/node) npm : 9.6.7 OS : macOS Unknown

Additional Information

No response

moerphie avatar Nov 04 '23 17:11 moerphie

Thanks for the report. This is happening due to an iOS 17 regression with accelerated animations. We reported this to Apple last week: https://bugs.webkit.org/show_bug.cgi?id=263996

liamdebeasi avatar Nov 06 '23 15:11 liamdebeasi

For someone looking for workaround: Hide backdrop element for a very short time between (willDismiss) and (didDismiss) events.

<ion-modal
    #myModal
    (willDismiss)="myModal.showBackdrop = false"
    (didDismiss)="myModal.showBackdrop = true"
></ion-modal>

or

<ion-modal
    [ngClass]={'hide-backdrop' : isHideBackdrop}
    (willDismiss)="isHideBackdrop = true"
    (didDismiss)="isHideBackdrop = false"
></ion-modal>
ion-modal.hide-backdrop{
    &::part(backdrop){
        display:none
    }
}

I hope webkit will resolve the issue soon.

kim-hanho avatar Jan 15 '24 12:01 kim-hanho

Hi everyone,

This has been resolved in iOS 17.5. This version is still in beta, but once it moves out of beta this fix will become available for everyone.

liamdebeasi avatar Apr 08 '24 13:04 liamdebeasi

It's merged, but not released yet i think? Looks like it is not fixed in 17.4.1

EinfachHans avatar Apr 08 '24 13:04 EinfachHans

I believe it was fixed in iOS 17.5.

edit: Whoops looks like iOS 17.5 is still in beta. I'll make a note of this above.

liamdebeasi avatar Apr 08 '24 14:04 liamdebeasi

Ahh yes i see, thank you!

Also i really appreciate that the ionic team forwards webkit bugs directly to the apple team πŸ™ŒπŸΌπŸ‘πŸΌ

EinfachHans avatar Apr 08 '24 14:04 EinfachHans

I'm on 17.5 beta but I'm still seeing the flicker :(

image

philmmoore avatar Apr 09 '24 19:04 philmmoore

I have the same problem, but in my case, it is infinite flashing

elbrinner avatar Apr 16 '24 08:04 elbrinner

Also seeing issue

dbousamra avatar Apr 19 '24 01:04 dbousamra

Hey @liamdebeasi I'm still seeing this in the latest beta release for 17.5 should we expect this to be resolved now?

image

https://github.com/ionic-team/ionic-framework/assets/2862059/ef482843-86b7-4170-b1c2-887f628ac035

philmmoore avatar Apr 30 '24 21:04 philmmoore

I'm still having this issue on modals on IOS 17.5 public beta !

maximilien0405 avatar May 19 '24 16:05 maximilien0405

@maximilien0405 ios 17.5 already has been released. Please check the final release, i don't have the problem anymore

EinfachHans avatar May 20 '24 12:05 EinfachHans

@EinfachHans I'm still having it.. sometime it flickers like in the video @philmmoore sent, sometime the backdrop dosen't have any fade-out animation and just disappears :/

maximilien0405 avatar May 20 '24 15:05 maximilien0405

@maximilien0405 then i would recommend open a new issue with a small repo where the team can reproduce the issue and decide if it is an ionic or webkit bug

EinfachHans avatar May 21 '24 08:05 EinfachHans

I am also still seeing this in iOS 17.5.1. I use the isOpen to handle the modal and this to fix the flash completely in React:

<IonModal isOpen={isOpen} showBackdrop={isOpen} />

felixhirschfeld avatar May 22 '24 06:05 felixhirschfeld

The issue persists on latest version of iOS

Vasile-Peste avatar Jun 18 '24 22:06 Vasile-Peste

Still facing this issue in iOS as well as Chrome and Safari on macOS.

moerphie avatar Jun 22 '24 13:06 moerphie

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[bot] avatar Jul 22 '24 13:07 ionitron-bot[bot]