fix(dialog): prevent scroll to top on modal close

- Move {...props} before onCloseAutoFocus to prevent override
- Simplify handler to just e.preventDefault()
- Apply fix to both dialog.tsx and modal.tsx
This commit is contained in:
sagitchu
2026-03-14 10:23:51 +08:00
parent 42a775c3bb
commit 06bb8b3b04
156 changed files with 294 additions and 167452 deletions
+5 -2
View File
@@ -73,9 +73,12 @@ const normalizeBatchFailure = (
};
};
const normalizeBatchFailureReason = (failure: BatchOperationFailure): string => {
const normalizeBatchFailureReason = (
failure: BatchOperationFailure,
): string => {
const name = typeof failure.name === "string" ? failure.name.trim() : "";
const reason = typeof failure.reason === "string" ? failure.reason.trim() : "";
const reason =
typeof failure.reason === "string" ? failure.reason.trim() : "";
if (name && reason) {
return `${name}: ${reason}`;