Shouldn't the setVisible(false) be before the show() like so:
dlg.setVisible(false);
dlg.show();
dlg.center();
dlg.setVisible(true);
or am I missing something?
Adil
I hate it when reality gets in the way like this. The scrollbar
flashes on the Popups tab when you click the 'Show Dialog' button. It
happens on the latest release Firefox (2.0.0.4) on my Powerbook G4
when the browser window is no more than 4/5 the height of the screen.
That gave me an idea and I may have a solution...
I think when the dialog pop-up is created the position is undefined
and somewhere to the bottom left of my window. So if I set its
position to 0,0 before the show() the problem does not happen. Like
so:
DialogBox dlg = new MyDialog();
dlg.setPopupPosition(0, 0);
dlg.show();
dlg.setVisible(false);
dlg.center();
dlg.setVisible(true);
Maybe the more elegant solution would be to put the setPopupPosition,
show and setVisible in the PopupPanel constructor and before any
contents are added to popup.
best
Adil
On Jun 4, 6:51 pm, "Rajeev Dayal" <rda...@google.com> wrote:
> Hi Adil,
>
> On which tab are you seeing this problem? What version of Firefox are you
> using?
>
> dlg.setVisible(false) is not before dlg.show() because in Internet Explorer,
> setVisible also sets the visibility of the IFRAME shim. The shim is not
> initialized until dlg.show() is called, so calling setVisible beforehand
> causes a NPE.
>
> In this RC cycle, we are looking for a more elegant solution to the problem
> of needing to call show() before center().
>
> Rajeev
>
Hello Rajeev,
I hate it when reality gets in the way like this. The scrollbar
flashes on the Popups tab when you click the 'Show Dialog' button. It
happens on the latest release Firefox ( 2.0.0.4) on my Powerbook G4