Pop up disappearing after clicking on tree

Hi there - quick question about this demo you guys have:

dhtmlx.com/docs/products/dhtmlxP … .html#code

Is that really all of the code you use to create a pop up with a tree in it? I used the code you have in your demo to add a tree to a pop-up and it wouldn’t launch. After some exploring I realized I need to ‘showpopup’ and ended up with this:

(NOTE: this code is inside of a click event)

var myPop;
var myTree;
var myPop = new dhtmlXPopup();
myTree = myPop.attachTree(350, 300);
myTree.setImagePath(“…/js/dhxtree_skyblue/”);
myTree.setSkin(“dhx_skyblue”);
myTree.loadXML(“…/js/tree.xml”);

    showPopup(this);

    function showPopup(inp) {
        myPop.show(20, 20, 400, 300); //params are: x, y, width, height
    }

The popup will now display, but if I click on the tree anywhere I noticed that the box disappears. After inspecting the element I see that its display is now set to :none. So technically it’s there, just hidden.

I don’t understand what I’m missing that isn’t in your demo. I’m launching this code from a button click, not a tool bar, but other than that my code looks the same as yours, yet the demo disappears on me.

I just noticed - even removing the tree and only displaying a pop up, ala:

var myPop = new dhtmlXPopup();
myPop.attachHTML("You can enter some text here");

function showPopup(inp) {
    myPop.show(20,20,400,300); //params are: x, y, width, height
}
function hidePopup() {
    myPop.hide();
}

clicking on the pop up sets the visibility to ‘none’. why does the box feel the need to change its visibility to none when clicked on?

Hello
Please, attach the whole html file and provide us a version/OS/browser you use to test this behavior. Locally everything is fine

The project I’m working on isn’t just a simple html file unfortunately. We’re using your gantt chart (v 3.2) as the main project, when a user clicks on a gantt task it brings up the lightbox. From here I have a custom button on the lightbox that I’m using to call the pop up window in question.

I can try to localize all of the code and send it, but it’s huge. I attached a screenshot to hopefully give you the idea of what i’m doing. Basic Gantt chart → lighbox is brought up → button is clicked → ‘you can enter some text here’ is displayed. clicking on the window hides it (see second attachment ‘beforeafter.png’.

Testing is done in Chrome, OS is Win 7 professional SP1.