Created
          August 5, 2011 09:56 
        
      - 
      
- 
        Save vega113/1127246 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | if (UserAgent.isFirefox()) { | |
| popup = | |
| PopupFactory.createPopup(this.getElement(), new RelativePopupPositioner() { | |
| @Override | |
| public void setPopupPositionAndMakeVisible(Element relative, final Element p) { | |
| ScheduleCommand.addCommand(new Scheduler.Task() { | |
| @Override | |
| public void execute() { | |
| p.getStyle().setLeft((RootPanel.get().getOffsetWidth() - p.getOffsetWidth()) / 2, Unit.PX); | |
| int top = (RootPanel.get().getOffsetHeight() - p.getOffsetHeight()) / 4; | |
| p.getStyle().setTop(Math.max(top, 280), Unit.PX); | |
| p.getStyle().setVisibility(Visibility.VISIBLE); | |
| } | |
| }); | |
| } | |
| }, chrome, | |
| true); | |
| } else { | |
| popup = PopupFactory.createPopup(null, new CenterPopupPositioner(), chrome, true); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment