Browse Source

无JIRA任务 存在在render 中调用 ResizeDetector 的写法,因此立即执行回调回引发npe

es6
dailer 5 years ago
parent
commit
f2388878a6
  1. 2
      src/core/platform/web/detectElementResize.js

2
src/core/platform/web/detectElementResize.js

@ -114,7 +114,7 @@
var addResizeListener = function (element, fn) { var addResizeListener = function (element, fn) {
if (attachEvent) { if (attachEvent) {
element.attachEvent("onresize", fn); element.attachEvent("onresize", fn);
fn(); BI.defer(fn);
} else { } else {
if (!element.__resizeTriggers__) { if (!element.__resizeTriggers__) {
if (getComputedStyle(element).position === "static") element.style.position = "relative"; if (getComputedStyle(element).position === "static") element.style.position = "relative";

Loading…
Cancel
Save