From 667714efb1a3ab6a0cfe7709ea882849022df2b2 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Mon, 30 Dec 2024 11:15:15 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(Dialog):=20=E4=BF=AE=E5=A4=8D=E9=AB=98?= =?UTF-8?q?=E5=BA=A6=E6=BA=A2=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Modal/ModalDialog.razor.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor/Components/Modal/ModalDialog.razor.js b/src/BootstrapBlazor/Components/Modal/ModalDialog.razor.js index e1603d2c9d5..f3a6db4c887 100644 --- a/src/BootstrapBlazor/Components/Modal/ModalDialog.razor.js +++ b/src/BootstrapBlazor/Components/Modal/ModalDialog.razor.js @@ -134,11 +134,17 @@ export function init(id) { } const update = el => { - const width = el.offsetWidth / 2; + const height = el.offsetHeight / 2; + const marginTop = parseFloat(getComputedStyle(el).marginTop); + const viewBoxHeight = window.innerHeight / 2; + if (viewBoxHeight - height - marginTop > 0) { + el.style.setProperty("margin-top", `calc(50vh - ${height}px)`); + } + const width = el.offsetWidth / 2; el.style.setProperty("margin-left", `calc(50vw - ${width}px)`); - el.style.setProperty("margin-top", `calc(50vh - ${height}px)`); + el.classList.remove('is-draggable-center'); } From 2290b373f7beb92bce03d4e65c09199362bfc1cf Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Mon, 30 Dec 2024 11:17:14 +0800 Subject: [PATCH 2/3] chore: bump version 9.2.0-beta01 --- src/BootstrapBlazor/BootstrapBlazor.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 047f0af70a4..46b5ff3f9b1 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@ - 9.2.0 + 9.2.0-beta01 From 22d9fbfb7492410bab8560f36a6f35576c9ae57c Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Mon, 30 Dec 2024 11:19:04 +0800 Subject: [PATCH 3/3] chore: bump version 9.2.0-beta02 Co-Authored-By: Ye Jiancong <60547439+ye1105@users.noreply.github.com> --- src/BootstrapBlazor/BootstrapBlazor.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 916b2274adb..b921a79d2aa 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@ - 9.1.9 + 9.2.0-beta02