thomascube
2011-01-21 26e76dfdd89f0183466f2d3354ff741680137c6f
Fix window size detection on IE

1 files modified
8 ■■■■ changed files
skins/default/functions.js 8 ●●●● patch | view | raw | blame | history
skins/default/functions.js
@@ -128,13 +128,13 @@
  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)) });
  }