#1202 scrollbar size is wrong when too broad selector is used
This commit is contained in:
parent
1dec807e36
commit
83c37fd41e
1 changed files with 5 additions and 4 deletions
|
|
@ -210,13 +210,13 @@ else
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.scrollbarWidth = function(document) {
|
exports.scrollbarWidth = function(document) {
|
||||||
|
var inner = exports.createElement("ace_inner");
|
||||||
var inner = exports.createElement("p");
|
|
||||||
inner.style.width = "100%";
|
inner.style.width = "100%";
|
||||||
inner.style.minWidth = "0px";
|
inner.style.minWidth = "0px";
|
||||||
inner.style.height = "200px";
|
inner.style.height = "200px";
|
||||||
|
inner.style.display = "block";
|
||||||
|
|
||||||
var outer = exports.createElement("div");
|
var outer = exports.createElement("ace_outer");
|
||||||
var style = outer.style;
|
var style = outer.style;
|
||||||
|
|
||||||
style.position = "absolute";
|
style.position = "absolute";
|
||||||
|
|
@ -225,10 +225,11 @@ exports.scrollbarWidth = function(document) {
|
||||||
style.width = "200px";
|
style.width = "200px";
|
||||||
style.minWidth = "0px";
|
style.minWidth = "0px";
|
||||||
style.height = "150px";
|
style.height = "150px";
|
||||||
|
style.display = "block";
|
||||||
|
|
||||||
outer.appendChild(inner);
|
outer.appendChild(inner);
|
||||||
|
|
||||||
var body = document.body || document.documentElement;
|
var body = document.documentElement;
|
||||||
body.appendChild(outer);
|
body.appendChild(outer);
|
||||||
|
|
||||||
var noScrollbar = inner.offsetWidth;
|
var noScrollbar = inner.offsetWidth;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue