Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The doCenter method doesn't center correctly the popup when the popup is hidden #302

Merged
merged 2 commits into from
Aug 8, 2013

Conversation

jDramaix
Copy link
Contributor

@jDramaix jDramaix commented Aug 8, 2013

The doCenter method is called twice when the popup presenter is revealed. The first time the method is called the popupPanel is hidden and the offsetWidth/ offsetHeight returns 0. The popuppanel is not correctly centered.

When the second call is done (in a deferred command) the popup is visible and so is correctly centered. But it looks like the popup jumps from the bottom right corner to the center. Furthermore if the developer is trying to align another widget with the popup (a tooltip for example) during the on reveal, the elements is misplaced.

@christiangoudreau
Copy link
Member

Fix build problems, then LGTM

elem.getStyle().clearLeft();
elem.getStyle().clearTop();

// the popup should be added to the dom in order to get correct values for offsetWidth/offsetHeight
if (!isShowing){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space

jDramaix added a commit that referenced this pull request Aug 8, 2013
The doCenter method doesn't center correctly the popup when the popup is hidden
@jDramaix jDramaix merged commit 0cdcfbe into master Aug 8, 2013
@jDramaix jDramaix deleted the jd_fix_jump_popuppanel branch August 8, 2013 14:02
jDramaix added a commit that referenced this pull request Apr 4, 2014
The doCenter method doesn't center correctly the popup when the popup is hidden
hpehl pushed a commit to hpehl/GWTP that referenced this pull request Dec 9, 2014
The doCenter method doesn't center correctly the popup when the popup is hidden


Former-commit-id: b5c0acc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants