enyo / opentip

Opentip is an open source javascript tooltip based on the protoype framework.
http://www.opentip.org
1.25k stars 401 forks source link

Toottip Behind Window #30

Closed nillerch closed 11 years ago

nillerch commented 11 years ago

Not sure if I am suppose to create a new issue as you have closed the first I wrote before I was able to test it.

I tried to set the Zindex as suggested but still the tooltip goes behind the window, I also tried to create the opentip object after the windows has been opened also with the same result. I have created a generic example with the Kendo UI widget library I uses to create the popup window, but cannot see any possibility to upload the example files here ? But here is my JS code: $(document).ready(function () { var window = $("#eventWindow"); window.kendoWindow({ width: "300px", height: "315px", title: "Tooltip always goes behind", actions: ["Refresh", "Maximize", "Close"], visible: false, }); window.bind("activate", openeventwindow); function openeventwindow(args) { var myOpentip = new Opentip($("#message")); myOpentip.lastZIndex = 100000; myOpentip.setContent("New Tootip contents always goes behinf the window"); } $("#Buttontest").bind('click', function() { window.data("kendoWindow").open(); }); });

enyo commented 11 years ago

Hi, using the other issue #29 would have been just fine. If the problem persists, I would have reopened the issue.

lastZIndex is a value shared between all opentips. So it is stored on the Opentip class itself, not the individual opentip instances. That's why you should use the code I posted in #29:

// Setting the z-index value of the first Opentip
// This value will be used an increased by every Opentip created and shown.
Opentip.lastZIndex = 100000;

not:

// Do NOT do this
myOpentip.lastZIndex = 100000;

Cheers.

PS: I'm closing this issue again. If you still experience the problem, just reply to to this post, and I'll reopen it if necessary.

nillerch commented 11 years ago

That did the trick, super thx, works perfect now br Torben