diff --git a/api-generator/components/sidebar.js b/api-generator/components/sidebar.js
index 9b17f9caa..039930a1c 100644
--- a/api-generator/components/sidebar.js
+++ b/api-generator/components/sidebar.js
@@ -46,6 +46,12 @@ const SidebarProps = [
type: 'string',
default: 'close',
description: 'Aria label of the close icon.'
+ },
+ {
+ name: 'blockScroll',
+ type: 'boolean',
+ default: 'false',
+ description: 'Whether background scroll should be blocked when sidebar is visible.'
}
];
diff --git a/components/sidebar/Sidebar.d.ts b/components/sidebar/Sidebar.d.ts
index eb727804b..246eadc1e 100755
--- a/components/sidebar/Sidebar.d.ts
+++ b/components/sidebar/Sidebar.d.ts
@@ -44,6 +44,10 @@ export interface SidebarProps {
* Default value is true.
*/
modal?: boolean | undefined;
+ /**
+ * Whether background scroll should be blocked when sidebar is visible.
+ */
+ blockScroll?: boolean | undefined;
}
export interface SidebarSlots {
diff --git a/components/sidebar/Sidebar.spec.js b/components/sidebar/Sidebar.spec.js
index 355bc4608..dacb4d869 100644
--- a/components/sidebar/Sidebar.spec.js
+++ b/components/sidebar/Sidebar.spec.js
@@ -70,14 +70,6 @@ describe('Sidebar.vue', () => {
expect(bindOutsideClickListenerSpy).toHaveBeenCalled();
});
- /* it('When transition trigger to onAfterLeave, bindOutsideClickListener should be triggered', async () => {
- const bindOutsideClickListenerSpy = vi.spyOn(wrapper.vm, 'bindOutsideClickListener');
-
- await wrapper.vm.onAfterLeave();
-
- expect(bindOutsideClickListenerSpy).toHaveBeenCalled();
- }); */
-
it('When keydown is triggered , hide method should be triggered', async () => {
const hideSpy = vi.spyOn(wrapper.vm, 'hide');
diff --git a/components/sidebar/Sidebar.vue b/components/sidebar/Sidebar.vue
index 2364098b0..6a0970ec5 100755
--- a/components/sidebar/Sidebar.vue
+++ b/components/sidebar/Sidebar.vue
@@ -67,7 +67,6 @@ export default {
default: true
}
},
- maskClickListener: null,
container: null,
content: null,
headerContainer: null,
diff --git a/pages/sidebar/SidebarDoc.vue b/pages/sidebar/SidebarDoc.vue
index dce73b828..2ff031d75 100755
--- a/pages/sidebar/SidebarDoc.vue
+++ b/pages/sidebar/SidebarDoc.vue
@@ -121,6 +121,12 @@ import Sidebar from 'primevue/sidebar';
Deprecated: aria.close can be used in defaults to PrimeVue