primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
10.96k stars 1.25k forks source link

Dialog: blockScroll props isn't working #6848

Open phat-dang opened 1 week ago

phat-dang commented 1 week ago

Describe the bug

I'm trying to use the blockScroll props to show scrollbar when open Dialog but seems isn't working. By default, blockScoll props is "false" and would show the scrollbar, but isn't.

Reproducer

https://stackblitz.com/edit/primevue-4-ts-vite-issue-template-2rk2yd?file=src%2FApp.vue

PrimeVue version

4.2.3

Vue version

4.x

Language

TypeScript

Build / Runtime

Nuxt

Browser(s)

No response

Steps to reproduce the behavior

  1. Open the Stackblitz example
  2. Click the 'Open Dialog' button
  3. Updates "blockScroll" props to true or false (default is false in Document: https://primevue.org/dialog/#api.dialog.props.blockScroll)
  4. Note that the props seems isn't working

Expected behavior

The scrollbar should display when "blockScroll" to false or vice versa https://primevue.org/dialog/#api.dialog.props.blockScroll

betavs commented 1 week ago

You should set :modal="false"

avramz commented 1 week ago

PR open - @tugcekucukoglu blockScroll property should actually have a true as a default value, because the dialog behavior out of the box is to block the scroll. I've updated the documentation and simplified the blockScroll logic.

github-actions[bot] commented 1 week ago

Due to PrimeVue team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. :sparkles: Thank you for your contribution! :sparkles: