diff --git a/packages/mui-base/src/unstable_useModal/useModal.ts b/packages/mui-base/src/unstable_useModal/useModal.ts index 1845810a01f7b2..4935fcf5f57e15 100644 --- a/packages/mui-base/src/unstable_useModal/useModal.ts +++ b/packages/mui-base/src/unstable_useModal/useModal.ts @@ -166,15 +166,15 @@ export function useModal(parameters: UseModalParameters): UseModalReturnValue { ): UseModalRootSlotProps => { const propsEventHandlers = extractEventHandlers(parameters) as Partial; - // The custom event handlers shouldn't be spread on the root element - delete propsEventHandlers.onTransitionEnter; - delete propsEventHandlers.onTransitionExited; - const externalEventHandlers = { ...propsEventHandlers, ...otherHandlers, }; + // The custom event handlers shouldn't be spread on the root element + delete externalEventHandlers.onTransitionEnter; + delete externalEventHandlers.onTransitionExited; + return { role: 'presentation', ...externalEventHandlers,