View Full Version : [CLOSED] Window z-index
someuser
21 Jan 2009, 2:12 AM
I have 2 windows, one is main and second works link popup, when I popup make show() for popup it views at background of main with less z-index.
I had tryed make DOM.setStyleAttribute(wnd.getElement(), "z-index", "2000"); or wnd.setActive(true); but nothing helped. Also wnd.toFront(); don't make window's z-index right :(
what can I do more?
thanks.
kolli
21 Jan 2009, 8:47 AM
can you post a sample code?
gslender
22 Jan 2009, 2:14 AM
try...
El.fly(wnd.el().dom).setZIndex(zIndex);
someuser
22 Jan 2009, 7:13 AM
try...
El.fly(wnd.el().dom).setZIndex(zIndex);
unfortunatly it didn't help :(
someuser
23 Jan 2009, 3:09 AM
Post your code please.
I can't post my code, but I tryed make in clean project and found the same situation:
Hyperlink link = new Hyperlink("asdasdas", "#");
link.addClickListener(new ClickListener()
{
public void onClick(Widget sender)
{
Window wnd2 = new Window();
wnd2.show();
}
});
Window wnd = new Window();
wnd.add(link);
wnd.show();
link.addClickListener(new ClickListener()
{
public void onClick(Widget sender)
{
final Window wnd2 = new Window();
DeferredCommand.addCommand(new Command(){
public void execute() {
wnd2.show();
}
});
}
});
With your example the window is in front for a little moment and than the first window gets focus back.
someuser
23 Jan 2009, 4:07 AM
link.addClickListener(new ClickListener()
{
public void onClick(Widget sender)
{
final Window wnd2 = new Window();
DeferredCommand.addCommand(new Command(){
public void execute() {
wnd2.show();
}
});
}
});
With your example the window is in front for a little moment and than the first window gets focus back.
On my computer it shows at background immediatly after it created. But this is a bug. In new project there are no other components or elements.
Have you tried my code? I did and it works. I also monitored what it is happening without my fix and what is going on is as aspected. So no bug!
Hyperlink link = new Hyperlink("asdasdas", "#"){
public void onBrowserEvent(Event event) {
if (DOM.eventGetType(event) == Event.ONCLICK) {
event.preventDefault();
event.cancelBubble(true);
Window wnd2 = new Window();
wnd2.show();
}
}
};
This code also works.
someuser
23 Jan 2009, 5:49 AM
Have you tried my code? I did and it works. I also monitored what it is happening without my fix and what is going on is as aspected. So no bug!
sorry I didn't see you changed som code :) thanks, its works!!!! =D>
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.