Skip to content

Strange behavior with Chrome and DialogBox.center() #180

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Displays a calendar with a large enough height to bring up the scroll bar of 
the browser. Eventually reduce the size of the browser.
2. Down the scroll bar to the bottom.
3. Show DialogBox centered (in onTimeBlockClick() for example).

What is the expected output? What do you see instead?
DialogBox should appear centered on the screen. Sometimes it works, sometimes 
the scroll bar up and DialogBox is hidden.

What version of the product are you using? On what operating system?
"gwt-cal-0.9.4.jar", Chrome 27, Windows 7.

Please provide any additional information below.
No problem with Firefox.

Workaround:
In InteractiveWidgethideFocusPanel() replace 
        DOM.setStyleAttribute(focusPanel.getElement(), "position", "absolute");
        DOM.setStyleAttribute(focusPanel.getElement(), "top", "0");
        DOM.setStyleAttribute(focusPanel.getElement(), "left", "-10");
        DOM.setStyleAttribute(focusPanel.getElement(), "height", "100%");
        DOM.setStyleAttribute(focusPanel.getElement(), "width", "0");
with
        DOM.setStyleAttribute(focusPanel.getElement(), "position", "relative");
        DOM.setStyleAttribute(focusPanel.getElement(), "top", "0");
        DOM.setStyleAttribute(focusPanel.getElement(), "left", "0");
        DOM.setStyleAttribute(focusPanel.getElement(), "height", "1px");
        DOM.setStyleAttribute(focusPanel.getElement(), "width", "1px");

Original issue reported on code.google.com by dom....@gmail.com on 1 Jul 2013 at 10:04

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions