Fix some scrollbar issues
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 22 Dec 2009 00:53:36 +0000 (17:53 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 22 Dec 2009 05:30:13 +0000 (22:30 -0700)
imp/js/DimpSlider.js
imp/js/ViewPort.js

index 5d8bab7..8874971 100644 (file)
@@ -76,6 +76,10 @@ var DimpSlider = Class.create({
             [ this.sbup, this.sbdown ].invoke('observe', 'mousedown', this._arrowClick.bindAsEventListener(this));
         }
 
+        if (Prototype.Browser.IE) {
+            [ this.track, this.sbup ].invoke('makePositioned');
+        }
+
         this.sbdownsize = this.sbupsize = this.value = 0;
         this.active = this.dragging = false;
 
@@ -92,7 +96,7 @@ var DimpSlider = Class.create({
     _initScroll: function()
     {
         if (this.init) {
-            return false;
+            return;
         }
         this.init = true;
         this.track.show();
@@ -101,7 +105,6 @@ var DimpSlider = Class.create({
             this.sbdownsize = this.sbdown.offsetHeight;
         }
         this._updateHandleLength();
-        return true;
     },
 
     _startDrag: function(e)
@@ -174,7 +177,7 @@ var DimpSlider = Class.create({
         if (!this.needScroll()) {
             this.value = 0;
             this.track.hide();
-        } else if (!this._initScroll()) {
+        } else {
             this.track.show();
             this._updateHandleLength();
         }
index 39766ed..1c2a074 100644 (file)
@@ -1291,11 +1291,11 @@ ViewPort_Scroller = Class.create({
         if (this.scrollbar.needScroll()) {
             switch (this.vp.pane_mode) {
             case 'horiz':
-                this.scrollDiv.setStyle({ float: 'left', position: 'static' }).setStyle({ marginLeft: '-' + this.scrollDiv.getWidth() + 'px' });
+                this.scrollDiv.setStyle({ float: 'left' }).setStyle({ marginLeft: '-' + this.scrollDiv.getWidth() + 'px' });
                 break;
 
             case 'vert':
-                this.scrollDiv.setStyle({ float: 'left', marginLeft: 0, position: 'static' });
+                this.scrollDiv.setStyle({ float: 'left', marginLeft: 0 });
                 if (!this.vertscroll) {
                     c.setStyle({ width: (c.clientWidth - this.scrollDiv.getWidth()) + 'px' });
                 }
@@ -1303,12 +1303,12 @@ ViewPort_Scroller = Class.create({
                 break;
 
             default:
-                this.scrollDiv.setStyle({ float: 'none', position: 'absolute', right: 0, top: 0 }).setStyle({ marginLeft: '-' + this.scrollDiv.getWidth() + 'px' });
+                this.scrollDiv.setStyle({ float: 'none' }).setStyle({ marginLeft: '-' + this.scrollDiv.getWidth() + 'px' });
                 break;
             }
 
             this.scrollDiv.setStyle({ height: c.clientHeight + 'px' });
-        } else if ((this.vp.pane_mode =='vert') && this.vertscroll) {
+        } else if ((this.vp.pane_mode == 'vert') && this.vertscroll) {
             c.setStyle({ width: (c.clientWidth + this.scrollDiv.getWidth()) + 'px' });
         }