On hide don't remove from DOM

2 posts, 1 answers
  1. Bilal
    Bilal avatar
    109 posts
    Member since:
    Oct 2014

    Posted 20 Feb 2015 Link to this post

    Hi,
    I noticed when hiding a notification, the notification gets removed from DOM hence, the entire UI I have shifts up to replace the gap that was filled by notification.

    Is there a way to just hide the notification without removing it from DOM?

    Best regards
    Bilal Haidar
  2. Answer
    Dimo
    Admin
    Dimo avatar
    8331 posts

    Posted 24 Feb 2015 Link to this post

    Hi Bilal,

    The fact that your UI shifts suggests that the some static notifications are displayed inside a container with no height. I recommend using a fixed height container for the notification messages, just like in this demo:

    http://demos.telerik.com/kendo-ui/notification/index

    Alternatively, you can use min and/or max height styles for the container.

    On the other hand, popup notification messages have no influence on the remaining page content, so you can choose this approach too.

    There is no built-in way to only hide notification messages without removing them from the DOM. A possible approach is to configure the notifications to be always visible and hide them manually with custom Javascript and a visibility:hidden style.

    http://docs.telerik.com/kendo-ui/api/javascript/ui/notification#configuration-autoHideAfter

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
Back to Top