]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - js/ui/qui.js
IE fixes.
[irc/quakenet/qwebirc.git] / js / ui / qui.js
index 0f515dea2d0ac395a1b166e6ed9868cd3a654c69..2206107d2a704efbc2135bcb3f2378eac6d0fce8 100644 (file)
@@ -260,7 +260,12 @@ qwebirc.ui.QUI.Window = new Class({
       
       tabclose.addEvent("click", close);
       this.tab.addEvent("mouseup", function(e) {
-        if(e.event.button == 1)
+        var button = 1;
+        
+        if(Browser.Engine.trident)
+          button = 4;
+
+        if(e.event.button == button)
           close(e);
       }.bind(this));
       
@@ -273,6 +278,7 @@ qwebirc.ui.QUI.Window = new Class({
     
     this.lines.addEvent("scroll", function() {
       this.scrolleddown = this.scrolledDown();
+      this.scrollpos = this.getScrollParent().getScroll();
     }.bind(this));
     
     if(type == qwebirc.ui.WINDOW_CHANNEL) {
@@ -300,8 +306,19 @@ qwebirc.ui.QUI.Window = new Class({
     this.parentObject.reflow();
   },
   onResize: function() {
-    if(this.scrolleddown)
-      this.scrollToBottom();
+    if(this.scrolleddown) {
+      if(Browser.Engine.trident) {
+        this.scrollToBottom.delay(5, this);
+      } else {
+        this.scrollToBottom();
+      }
+    } else if($defined(this.scrollpos)) {
+      if(Browser.Engine.trident) {
+        this.getScrollParent().scrollTo(this.scrollpos.x, this.scrollpos.y);
+      } else {
+        this.getScrollParent().scrollTo.delay(5, this, [this.scrollpos.x, this.scrollpos.y]);
+      }
+    }
   },
   createMenu: function(nick, parent) {
     var e = new Element("div");