diff options
author | thomascube <thomas@roundcube.net> | 2011-01-21 17:12:43 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-01-21 17:12:43 +0000 |
commit | 26e76dfdd89f0183466f2d3354ff741680137c6f (patch) | |
tree | 55e82d6fd8291ddd6c5434432f94f29f445d70f8 /skins/default | |
parent | 31278471d3f2b882e28e01184814f3edc69973bf (diff) |
Fix window size detection on IE
Diffstat (limited to 'skins/default')
-rw-r--r-- | skins/default/functions.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/skins/default/functions.js b/skins/default/functions.js index 62e4783cb..9eed5f054 100644 --- a/skins/default/functions.js +++ b/skins/default/functions.js @@ -128,13 +128,13 @@ show_popupmenu: function(popup, show) if (show && ref) { var parent = $(ref).parent(), + win = $(window), pos = parent.hasClass('dropbutton') ? parent.offset() : $(ref).offset(); - if (!above && pos.top + ref.offsetHeight + obj.height() > window.innerHeight) + if (!above && pos.top + ref.offsetHeight + obj.height() > win.height()) above = true; - - if (pos.left + obj.width() > window.innerWidth) - pos.left = window.innerWidth - obj.width() - 30; + if (pos.left + obj.width() > win.width()) + pos.left = win.width() - obj.width() - 30; obj.css({ left:pos.left, top:(pos.top + (above ? -obj.height() : ref.offsetHeight)) }); } |