Changeset 594 for trunk/popups


Ignore:
Timestamp:
10/03/06 16:13:53 (13 years ago)
Author:
ray
Message:
  • Ticket #863 Using Esc in dialog creates error
  • popup.js dlg_init() called with win_dim
    • old behaviour Mozilla: popup centered in the middle of the window, IE: popup in the upper left corner
    • new behaviour: IE centered in the middle of the screen
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/popups/popup.js

    r563 r594  
    6060    else 
    6161    { 
    62       var x = opener.screenX + (opener.outerWidth - win_dim.width) / 2; 
    63       var y = opener.screenY + (opener.outerHeight - win_dim.height) / 2; 
     62      if (!HTMLArea.is_ie) 
     63      { 
     64        var x = opener.screenX + (opener.outerWidth - win_dim.width) / 2; 
     65        var y = opener.screenY + (opener.outerHeight - win_dim.height) / 2; 
     66      } 
     67      else 
     68      {//IE does not have window.outer... , so center it on the screen at least 
     69        var x =  (self.screen.availWidth - win_dim.width) / 2; 
     70        var y =  (self.screen.availHeight - win_dim.height) / 2;         
     71      } 
    6472      window.moveTo(x,y); 
    6573    } 
     
    126134        ev || (ev = window.event); 
    127135        if (ev.keyCode == 27) { 
    128                 window.close(); 
     136                __dlg_close(null); 
    129137                return false; 
    130138        } 
Note: See TracChangeset for help on using the changeset viewer.