Skip to content

Commit 86eebad

Browse files
committed
remove unused backdrop class and styles file
1 parent cd7ebc1 commit 86eebad

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

packages/circuit-ui/components/Dialog/Dialog.tsx

+2-9
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import { useLatest } from '../../hooks/useLatest/index.js';
3939
import { useI18n } from '../../hooks/useI18n/useI18n.js';
4040

4141
import { getFirstFocusableElement } from './DialogService.js';
42-
import classes from './dialog.module.css';
42+
import classes from './Dialog.module.css';
4343
import { translations } from './translations/index.js';
4444

4545
type DataAttribute = `data-${string}`;
@@ -248,20 +248,14 @@ export const Dialog = forwardRef<HTMLDialogElement, DialogProps>(
248248
if (!dialogElement) {
249249
return;
250250
}
251-
252-
if (!hasNativeDialog && isModal) {
253-
(dialogElement.nextSibling as HTMLDivElement).classList.remove(
254-
classes['backdrop-visible'],
255-
);
256-
}
257251
onCloseStart?.();
258252
// trigger closing of the dialog after animation
259253
setTimeout(() => {
260254
if (dialogElement.open) {
261255
dialogElement.close();
262256
}
263257
}, animationDurationRef.current);
264-
}, [hasNativeDialog, animationDurationRef.current, isModal, onCloseStart]);
258+
}, [animationDurationRef.current, onCloseStart]);
265259

266260
const handleOutsideClick = useCallback(() => {
267261
lastFocusedElementRef.current = null;
@@ -295,7 +289,6 @@ export const Dialog = forwardRef<HTMLDialogElement, DialogProps>(
295289
if (!hasNativeDialog && dialogElement.nextSibling) {
296290
// use the polyfill backdrop
297291
(dialogElement.nextSibling as HTMLDivElement).classList.add(
298-
classes['backdrop-visible'],
299292
classes.backdrop,
300293
);
301294
// intercept and prevent modal closing if preventClose is true

0 commit comments

Comments
 (0)