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

<Object> Tag Hides Sub Menu Items

2 Answers 102 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 16 Aug 2012, 12:14 PM

Hi,

I am currently in the process of migrating from the MVC controls to the Kendo UI.
For the MVC controls, there was a work around to the old IE bug where menu sub items were hidden behind object tags. This work around can be seen below.
if ($.browser.msie) {
    var oldFxPlay = $.telerik.fx.play;
 
    $.telerik.fx.play = function () {
 
        var target = $(arguments[1]);
        if (target.is(".t-menu .t-group") && !target.find("iframe").length) {
            target.append("<li style='width:100%;height:100%;z-index:-1;position:absolute;top:0;left:0;'>" +
                      "<iframe src='#' frameborder='0' style='width:100%;height:100%;z-index:-1;position:absolute;'></iframe>" +
                  "</li>");
        }
        oldFxPlay.apply(this, Array.prototype.slice.apply(arguments));
    };
}

I now need something similar for the Kendo UI menu. Is there anything available?

Many thanks in advance for your support.

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 17 Aug 2012, 12:39 PM
Hi Andrew,

You can inject an iframe in the Menu's Open event:


function onOpen(e) {
    if ($.browser.msie) {
        var groupUL = $(e.item).children(".k-group"),
            iframePlaced = groupUL.find(".iframeWrapper").length > 0;
 
        if (!iframePlaced) {
            groupUL.append("<li class='iframeWrapper' style='width:100%;height:100%;z-index:-1;position:absolute;top:0;left:0;'>" +
                "<iframe frameborder='0' style='width:100%;height:100%;z-index:-1;position:absolute;'></iframe>" +
            "</li>");
        }
    }
}

Overriding a prototype, similar to the previous approach, seems impossible, unfortunately. You will need to apply the above workaround for each Menu instance that needs it separately.


Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Andrew
Top achievements
Rank 1
answered on 17 Aug 2012, 12:46 PM
Hi Dimo,

Thank you very much for your support, that works great for me.

Regards

Andrew
Tags
Menu
Asked by
Andrew
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Andrew
Top achievements
Rank 1
Share this question
or