From 8d5ed47a282f92a60a2c4126a673cc2a5733067e Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 8 Dec 2020 10:16:29 -0500 Subject: [PATCH] fix(refresher): clean up old css if calling refresh method before native refresher is setup (#22640) resolves #22636 --- core/src/components/refresher/refresher.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/src/components/refresher/refresher.tsx b/core/src/components/refresher/refresher.tsx index dc9e049b0a..e44d52474a 100644 --- a/core/src/components/refresher/refresher.tsx +++ b/core/src/components/refresher/refresher.tsx @@ -378,6 +378,15 @@ export class Refresher implements ComponentInterface { return; } + /** + * If using non-native refresher before make sure + * we clean up any old CSS. This can happen when + * a user manually calls the refresh method in a + * component create callback before the native + * refresher is setup. + */ + this.setCss(0, '', false, ''); + this.nativeRefresher = true; const pullingSpinner = this.el.querySelector('ion-refresher-content .refresher-pulling ion-spinner') as HTMLIonSpinnerElement;