From 4356cf92c257ebdd533c18b76101e3960c250536 Mon Sep 17 00:00:00 2001 From: Tomas Bezouska Date: Sat, 18 Sep 2021 01:31:42 +0200 Subject: [PATCH] fix(module: overlay): format number InvariantCulture (#1956) In cultures where decimal separator is ',' overlay would be ill-positioned Resolves #1955 Co-authored-by: James Yeung --- .../core/JsInterop/modules/components/OverlayPosition.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/core/JsInterop/modules/components/OverlayPosition.cs b/components/core/JsInterop/modules/components/OverlayPosition.cs index 11cee2ca..99769aec 100644 --- a/components/core/JsInterop/modules/components/OverlayPosition.cs +++ b/components/core/JsInterop/modules/components/OverlayPosition.cs @@ -1,4 +1,6 @@ -namespace AntDesign.Core.JsInterop.Modules.Components +using System.Globalization; + +namespace AntDesign.Core.JsInterop.Modules.Components { public class OverlayPosition { @@ -22,7 +24,7 @@ if (value is null) return "unset;"; else - return value.ToString() + "px;"; + return string.Format(CultureInfo.InvariantCulture, "{0}px;", value); } } }