This is a migrated thread and some comments may be shown as answers.

How to globally disabled scrolling when a modal is open

2 Answers 2437 Views
Dialog
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 07 May 2019, 09:24 PM

Hi,

When opening a <kendo-dialog> the background is still scrolling.

The work around I found is to set the <body> with an overflow:hidden.

But how to automate this generally for all my modals?

Since this is a modal, I think the kendo-dialog should be disabling the body scrolling.

Any workaround to fix this?

Thanks.

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Topalov
Telerik team
answered on 08 May 2019, 01:30 PM
Hello Patrick,

You are correct - the modal nature of the Dialog suggests that the page should not be scrollable when the Dialog is opened. This is why we have logged an enhancement item to our GitHub repository that you can track here:

https://github.com/telerik/kendo-angular/issues/786

Our developers and UX specialists will discuss this topic, and we will consider adding this enhancement, based on their assessment. Meanwhile, you can utilize the workaround outlined in the GitHub thread, e.g.:

https://stackblitz.com/edit/angular-g2clgx?file=app/app.component.ts

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.

0
Patrick
Top achievements
Rank 1
answered on 08 May 2019, 02:25 PM

Thank you for the quick response Dimiter.

The workaround works great!

Tags
Dialog
Asked by
Patrick
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Patrick
Top achievements
Rank 1
Share this question
or