user1722889
user1722889

Reputation:

Window.resizeTo() not working

I need to increase the size of my dialog box on some event firing for that I am using Window.resizeTo() method in GWT but it is not working. I read its note that

"In Chrome, this method only works with windows created by Window.open()".

Can someone suggest what I am missing?

Upvotes: 0

Views: 563

Answers (1)

Sam
Sam

Reputation: 2747

You can't use window.resizeTo if you are using DialogBox. Because DialogBox doesn't open a new browser window. This creates a modal TABLE-Element.

The table is styled as following:

element.style {
  overflow: hidden;
  visibility: visible;
  position: absolute;
  left: 600px;
  top: 174px;
  clip: rect(auto auto auto auto);
}

A form of popup that has a caption area at the top and can be dragged by the user. Unlike a PopupPanel, calls to PopupPanel.setWidth(String) and PopupPanel.setHeight(String) will set the width and height of the dialog box itself, even if a widget has not been added as yet.

See the documentation for more information.

If you are not using DialogBox. Use DialogBox instead of a browser popup. (this can't be blocked from popup blocker)

Upvotes: 2

Related Questions