Browse Source

Merge pull request #233459 in DEC/fineui from master to feature/x

* commit '1fb9b97fe6b18680d898e26d3072c9ea3941fc5a':
  BI-124559 fix: 升级BI6版本后,老版本火狐浏览器无法打开仪表板
research/test
superman 2 years ago
parent
commit
894bfc20ec
  1. 5
      src/core/platform/web/dom.js

5
src/core/platform/web/dom.js

@ -108,12 +108,13 @@
}, },
// 获取滚动条的宽度,页面display: none时候获取到的为0 // 获取滚动条的宽度,页面display: none时候获取到的为0
getScrollWidth: function () { getScrollWidth: function (css) {
if (BI.isNull(this._scrollWidth) || this._scrollWidth === 0) { if (BI.isNull(this._scrollWidth) || this._scrollWidth === 0) {
var ul = BI.Widget._renderEngine.createElement("<div>").width(50).height(50).css({ var ul = BI.Widget._renderEngine.createElement("<div>").width(50).height(50).css({
position: "absolute", position: "absolute",
top: "-9999px", top: "-9999px",
overflow: "scroll" overflow: "scroll",
...css
}).appendTo("body"); }).appendTo("body");
this._scrollWidth = ul[0].offsetWidth - ul[0].clientWidth; this._scrollWidth = ul[0].offsetWidth - ul[0].clientWidth;
ul.destroy(); ul.destroy();

Loading…
Cancel
Save