]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Scroll percentage wise, also delay scrolling for IE so it doesn't go insane.
authorChris Porter <redacted>
Sun, 9 Nov 2008 11:56:42 +0000 (11:56 +0000)
committerChris Porter <redacted>
Sun, 9 Nov 2008 11:56:42 +0000 (11:56 +0000)
TODO.txt
js/ui/qui.js

index db6b31597ce4897619891113fa743997aeba4e18..cbd4d1f6187f60c723c644ca95b9de575f7dcbb8 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -2,7 +2,7 @@ UI:
   tab dragging\r
   undo closed tab\r
   [ ] style flashing\r
-\r
+  \r
 Authing:\r
   Finish integration\r
   Fix up state inconsistency if backend is restarted (state is stored in user cookie and not refreshed except on login).\r
index 24da5743cb958f5db757dca20353cce9307ae379..2206107d2a704efbc2135bcb3f2378eac6d0fce8 100644 (file)
@@ -278,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) {
@@ -305,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");