Revert "add scrollbar before scroller to not cover it"
This reverts commit decebfc552.
This commit is contained in:
parent
e1b21b0dc8
commit
16abfcbe75
1 changed files with 2 additions and 3 deletions
|
|
@ -50,17 +50,16 @@ var ScrollBar = function(parent) {
|
||||||
this.inner = dom.createElement("div");
|
this.inner = dom.createElement("div");
|
||||||
this.element.appendChild(this.inner);
|
this.element.appendChild(this.inner);
|
||||||
|
|
||||||
|
parent.appendChild(this.element);
|
||||||
|
|
||||||
// in OSX lion the scrollbars appear to have no width. In this case resize
|
// in OSX lion the scrollbars appear to have no width. In this case resize
|
||||||
// the to show the scrollbar but still pretend that the scrollbar has a width
|
// the to show the scrollbar but still pretend that the scrollbar has a width
|
||||||
// of 0px
|
// of 0px
|
||||||
// in Firefox 6+ scrollbar is hidden if element has the same width as scrollbar
|
// in Firefox 6+ scrollbar is hidden if element has the same width as scrollbar
|
||||||
// make element a little bit wider to retain scrollbar when page is zoomed
|
// make element a little bit wider to retain scrollbar when page is zoomed
|
||||||
// and insert it before other siblings to not cover them
|
|
||||||
this.width = dom.scrollbarWidth(parent.ownerDocument);
|
this.width = dom.scrollbarWidth(parent.ownerDocument);
|
||||||
this.element.style.width = (this.width || 15) + 5 + "px";
|
this.element.style.width = (this.width || 15) + 5 + "px";
|
||||||
|
|
||||||
parent.insertBefore(this.element, parent.firstChild);
|
|
||||||
|
|
||||||
event.addListener(this.element, "scroll", this.onScroll.bind(this));
|
event.addListener(this.element, "scroll", this.onScroll.bind(this));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue