Skip to content

[Bug]: DialogContentModal overrides disableOutsidePointerEvents #2677

Closed

Description

@rafael-perini

Environment

Developement/Production OS: Windows 10 19043.1110
Node version: 16.0.0
Package manager: pnpm@8.6.0
Reka UI version: 2.0.0
Vue version: 3.0.0
Nuxt version: 3.0.0
Nuxt mode: universal
Nuxt target: server
CSS framework: tailwindcss@3.3.3
Client OS: Windows 10 19043.1110
Browser: Chrome 90.0.4430.212

Link to minimal reproduction

https://reka-ui.com/docs/components/dialog#content

Steps to reproduce

Open any dialog with <dialog-content :disableOutsidePointerEvents="false"> and you'll see that the body stills receive the style="pointer-events: none;", even tought the docs says that the prop exists.

Describe the bug

According to the docs bellow, the dialog content should be able to receive the disableOutsidePointerEvents prop.

Image

But what actually happens is that the DialogContentModal, used by the DialogContent overrides it.

My suggestion is to change the code bellow to use withDefaults (const props = withDefaults( defineProps<DialogContentImplProps>(), { disableOutsidePointerEvents: true })) and remove the :disable-outside-pointer-events="true" allowing the DialogContent to actually receive and pass forward the prop.

Image

Expected behavior

The DialogContent to receive and actually pass the disableOutsidePointerEvents prop forward.

Context & Screenshots (if applicable)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions