Position dialog without in center of current scroll position

Hi there,

I'm attempting to centre a dialog on the screen, but the div I'm putting it in is bigger than the current screen height. 

Instead of centering on the current view, the dialog centres on the whole div, which causes the content to scroll to the middle (down or up depending on current location) and always shows the dialog there. Is there any way to centre the dialog only on the current scroll position, not the centre of the whole div?

5 Replies 1 reply marked as answer

IS Indrajith Srinivasan Syncfusion Team August 13, 2020 10:34 AM UTC

Hi Goce, 
 
Greetings from Syncfusion support, 
 
We have validated your reported query. If the SfDialog is rendered with target it will be centered based on the target height. In order to center the SfDialog based on current view, we suggest you to render the SfDialog configuring the modal with body as target(If Target property is not specified, it will be rendered based on the body). We have also prepared a sample based on your requirements. 
 
 
Also, we suggest the below SfDialog behavior of positioning the dialog when scrolling.  
 
 
Regards, 
Indrajith 


Marked as answer

GP Goce Petrovski August 17, 2020 02:27 AM UTC

Thanks Indrajith,

That worked perfectly. Might be worth updating your docs to mention the stuff around removing the target, or at least, I didn't find it anywhere.


IS Indrajith Srinivasan Syncfusion Team August 17, 2020 07:04 AM UTC

Hi Martin, 
 
Thanks for your suggestions, 
 
We will document the same with the SfDialog on or before our 2020 Volume 3 Main release. 
 
Regards, 
Indrajith 



IS Indrajith Srinivasan Syncfusion Team October 6, 2020 12:15 PM UTC

Hi Martin,

We couldn't update our documentation with our Volume 3 main release. We will update the documentation from our end, on or before Volume 3 SP 1 release.

Regards,
Indrajith


IS Indrajith Srinivasan Syncfusion Team December 10, 2020 12:24 PM UTC

Hi Martin,

We have documented, the SfDialog target usage in our documentation.

https://blazor.syncfusion.com/documentation/dialog/getting-started/#run-the-application

Regards,
Indrajith 


Loader.
Up arrow icon