From 212d086676a3246fd225f346af2ab920634a7643 Mon Sep 17 00:00:00 2001 From: Dimitris-Rafail Katsampas Date: Sat, 14 Oct 2023 04:58:35 +0300 Subject: [PATCH] fix(ios): property mask on 'undefined' during view disposal (#10404) --- packages/core/ui/core/view/index.ios.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/core/ui/core/view/index.ios.ts b/packages/core/ui/core/view/index.ios.ts index 3967b3b69..a1de34be4 100644 --- a/packages/core/ui/core/view/index.ios.ts +++ b/packages/core/ui/core/view/index.ios.ts @@ -74,11 +74,14 @@ export class View extends ViewCommon implements ViewDefinition { this._hasTransform = false; this._hasPendingTransform = false; - // Make sure shadows get removed - this.style.backgroundInternal.clearFlags |= BackgroundClearFlags.CLEAR_BOX_SHADOW; + // If native view extends UIView, perform a background cleanup to get rid of shadow layers + if (this.nativeViewProtected instanceof UIView) { + // Make sure shadows get removed + this.style.backgroundInternal.clearFlags |= BackgroundClearFlags.CLEAR_BOX_SHADOW; - // Perform background cleanup - iosBackground.clearBackgroundVisualEffects(this); + // Perform background cleanup + iosBackground.clearBackgroundVisualEffects(this); + } } public requestLayout(): void {