Browse Source

Pull request #3264: BI-118754 fix(getMinimumFontSize): 获取最小字号无效

Merge in VISUAL/fineui from ~XAVIER.MENG/fineui:master to master

* commit '6fd7a76da423e9ae345291a7b18d6791a89dd465':
  BI-118754 fix(getMinimumFontSize): 获取最小字号无效
research/test
Xavier.Meng-孟宇翔 2 years ago
parent
commit
dc63d48a31
  1. 3
      src/core/platform/web/function.js

3
src/core/platform/web/function.js

@ -140,8 +140,9 @@ BI._.extend(BI, {
}, },
getMinimumFontSize: function () { getMinimumFontSize: function () {
// not work for firefox
const el = document.createElement('div'); const el = document.createElement('div');
el.style.fontSize = "0px"; el.style.fontSize = "1px";
document.body.appendChild(el); document.body.appendChild(el);
const size = getComputedStyle(el).fontSize; const size = getComputedStyle(el).fontSize;
el.remove(); el.remove();

Loading…
Cancel
Save