Possible bug with window using Visible(false)

9 posts, 0 answers
  1. Brian Roth
    Brian Roth avatar
    139 posts
    Member since:
    Oct 2005

    Posted 04 Jun 2012 Link to this post


    We're starting to play with the MVC beta and liking what we're seeing so far.  But I think I may have found a bug with the window control.  If you default the visible state to false the window as well as the content get styled to display:none.  It seems like the display: none never gets removed from the content section when the window is activated.  All I see in the UI is the title bar of the window.  I ran into this in my application and was able to reproduce it on one of the demo pages.  In the actions.cshtml page I added .Visible(false) like so:

        .Title("About Josef Hoffmann")
        .Actions(actions => actions
            <div class="armchair">
                <img src="@Url.Content("~/Content/web/window/kubus-armchair.png")"
                        alt="Josef Hoffmann - Kubus Armchair" />
                Josef Hoffmann - Kubus Armchair
                Josef Hoffmann studied architecture at the Academy of Fine Arts in Vienna,
                Austria, under Art Nouveau architect Otto Wagner, whose theories of functional,
                modern architecture profoundly influenced his works, and in 1896 he joined his office.
                In 1898, he established his own practice in Vienna. In 1897, inspired by Mackintosh
                and the Glasgow School, he was one of the founding members with Gustav Klimt, of an
                association of revolutionary artists and architects, the Vienna Secession.
                In 1903, he founded with architects Koloman Moser and Joseph Maria Olbrich, the Wiener
                Werkstätte for decorative arts.
                They aspired to the renaissance of the arts and crafts and to bring more abstract and
                purer forms to the designs of buildings and furniture, glass and metalwork, following
                the concept of total work of art. Hoffman's works combined functionality and simplicity
                of craft production with refined and innovative ornamental details and geometric
                elements. He is an important precursor of the Modern Movement and Art Deco.
                <a href="http://www.senses-artnouveau.com/biography.php?artist=hof" title="About Josef Hoffmann">http://www.senses-artnouveau.com/<;/a>
    <span id="undo" class="k-button">Click to open the window</span>
        $(document).ready(function() {
            var dialog = $("#window");
            $("#undo").bind("click", function() {
                alert("Custom action button clicked");
    <style scoped>
        #example {
        .armchair {
            float: left;
            margin: 20px 30px;
            text-align: center;
        .armchair img {
            display: block;
            margin-bottom: 10px;

    Let me know if there's something I'm doing wrong or if this indeed is an issue with the kendo code.  Thanks!

    Brian Roth
  2. Alex Gyoshev
    Alex Gyoshev avatar
    2515 posts

    Posted 05 Jun 2012 Link to this post

    Hello Brian,

    Indeed, this is a problem with Kendo itself (initializing a window from a hidden <div>). We will address the issue for the next release. Your Telerik points have been updated for the bug report.

    Kind regards,
    Alex Gyoshev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Eric
    Eric avatar
    19 posts
    Member since:
    Mar 2008

    Posted 07 Jun 2012 Link to this post

    Alex, what is the proper workaround for now?  I've tried a few things like manually showing the content but it doesn't display.

  4. Eric
    Eric avatar
    19 posts
    Member since:
    Mar 2008

    Posted 07 Jun 2012 Link to this post

    OK, got something working.  I just surrounded the extension declaration with a hidden div and show/hide that instead.   The window itself is set to be visible in it's definition.
  5. Brian Roth
    Brian Roth avatar
    139 posts
    Member since:
    Oct 2005

    Posted 05 Jul 2012 Link to this post

    Hi Alex,

    I tested this with the Beta release and it looks like it's fixed (mostly).  Thanks for that!  The one issue I'm still having is that for a window where I have a kendo DropDownList control on it, the DropDownList still does not show.  Any ideas of things I can try in order to fix this?

  6. Don
    Don avatar
    66 posts
    Member since:
    Jun 2012

    Posted 05 Jul 2012 Link to this post

    Just wanted to share a simple workaround that worked for me in case it helps anyone:

    Originally, I had this in my code to show the window:


    As mentioned in this thread, the title would show but not the content.  Changing it to this made it work:

  7. Dan
    Dan avatar
    2 posts
    Member since:
    Dec 2012

    Posted 28 Dec 2012 Link to this post

    I'm using kendoui.aspnetmvc.2012.3.1114.commercial (and why doesn't the account show what version I bought?)

    UPDATE: This issue was that my ContentPages contained additional jquery script includes. When I removed them, then it started working.

    This is very frustrating. I still can't get this to work...

            @Html.Kendo().Window().Name("window").Title("Create Profile").Draggable().LoadContentFrom("Create", "Home").Visible(false)

            <a id='createProfile' href='#'>Add One</a>
            <script type="text/javascript">
                $("#createProfile").click(function () {

    More information... It's failing on LoadContentFrom( ).

    I've tried ActionResult and PartialViewResult with no luck. 

    Any ideas?

    public ActionResult Create()
              return View();
  8. kurt place
    kurt place avatar
    9 posts
    Member since:
    Aug 2012

    Posted 22 Apr 2015 Link to this post

    It seems that I am seeing this as well.  I have a kendo window in an ascx file.  There are 2 on the page, one that starts visible and the other not until later it is shown programmatically.  When the window from the first control is shown then the content is visible.  However when I have the window from the second control the content's div is marked as visibility: hidden; and does not show.
  9. Dimo
    Dimo avatar
    8406 posts

    Posted 27 Apr 2015 Link to this post

    Hello Kurt,

    If there is a <div> with a visibility:hidden style inside the Window content, then you need to remove this style yourself, e.g. in the show event. The Window does not manage the styling of its content in any way.

    Generally, this visibility style is not needed at all, because a Window widget with a .Visible(false) setting will be rendered with a display:none style, so none of its descendant elements will be visible. The display:none style will be removed by the widget automatically upon opening.


    See What's Next in App Development. Register for TelerikNEXT.

Back to Top