Sorry, I can't help you. That's far more complex than what I use. I've been
sticking with the GWT API, something like:
final DialogBox dialog = new DialogBox(true, true);
// Create dialog contents--panel, text, buttons, etc
dialog.setGlassEnabled(true);
dialog.setAnimationEnabled(true); // I've not used this, but the code tells
me that the default is 200.
dialog.setPopupPositionAndShow(new PopupPanel.PositionCallback() {
public void setPosition(int offsetWidth, int offsetHeight) {
int left = eachHotel.getAbsoluteLeft();
int top = eachHotel.getAbsoluteTop();
dialog.setHeight((Window.getClientHeight() - 255)+"px");
dialog.setPopupPosition(left, top);
}
});
Somewhere in my dialog I may have one or more buttons whose onClick() ends
with dialog.hide(). I've never called removeFromParent()
My window has not scrolled, regardless of where inside it I've placed my
popup.
On Wednesday, August 15, 2012 3:09:47 PM UTC-4, Deepak Singh wrote:
>
> Still the issue is not resolved. It happens on all browsers.
>
> Any one can figure out it.
>
> On Wed, Aug 15, 2012 at 12:17 AM, Deepak Singh
> <[email protected]<javascript:>
> > wrote:
>
>> Hi,
>>
>> I use following code :
>>
>>
>> int left = eachHotel.getAbsoluteLeft();
>> int top = eachHotel.getAbsoluteTop();
>> final DialogBox dialog = new DialogBox(true, true);
>> dialog.getElement().getStyle().setHeight(Window.getClientHeight() - 255,
>> Unit.PX);
>> dialog.setPopupPosition(left, top);
>>
>> $(dialog).as(Effects).fadeIn(100, new Function() {
>> @Override
>> public void f() {
>> dialog.show();
>> }
>> });
>> dialog.addCloseHandler(new CloseHandler<PopupPanel>() {
>> @Override
>> public void onClose(CloseEvent<PopupPanel> event) {
>> $(dialog).as(Effects).fadeOut(300, new Function() {
>> @Override
>> public void f() {
>> dialog.removeFromParent();
>> }
>> });
>> }
>> });
>>
>> I am setting the position relative to some object(eachhotel).
>>
>> Once the dialog closes, the Window scrolls to top.
>>
>> Regards
>> Deepak
>>
>>
>> On Tue, Aug 14, 2012 at 3:19 AM, Thad <[email protected] <javascript:>
>> > wrote:
>>
>>> I've not seen this behavior. Perhaps if you provided more information or
>>> a code snippet? What version of GWT? In which browsers? What are the
>>> autoHide and modal settings for the panel?
>>>
>>>
>>> On Sunday, August 12, 2012 12:44:13 PM UTC-4, Deepak Singh wrote:
>>>>
>>>> Hi All,
>>>>
>>>> I have a popup panel and am showing some content inside it with
>>>> scrolling enabled inside popupPanel.
>>>>
>>>> Now the problem i am facing is that,
>>>> after closing popupPanel(once it hides), the current Window
>>>> automatically scrolls to top. I want the window should remain as it is
>>>> even
>>>> after closing popupPanel.
>>>>
>>>>
>>>>
>>>> Thanks
>>>> Deepak Singh
>>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/oONRn1FDbNgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.