From 4fce1b9929f253655e39878ab117ee1dbf21f7af Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 21 Dec 2009 17:53:36 -0700 Subject: [PATCH] Fix some scrollbar issues --- imp/js/DimpSlider.js | 9 ++++++--- imp/js/ViewPort.js | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/imp/js/DimpSlider.js b/imp/js/DimpSlider.js index 5d8bab7a7..887497127 100644 --- a/imp/js/DimpSlider.js +++ b/imp/js/DimpSlider.js @@ -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(); } diff --git a/imp/js/ViewPort.js b/imp/js/ViewPort.js index 39766ed9f..1c2a074fc 100644 --- a/imp/js/ViewPort.js +++ b/imp/js/ViewPort.js @@ -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' }); } -- 2.11.0