Skip to content

Commit 306050e

Browse files
committed
Require widget to be attached to dom when calling resize
1 parent 1b3d485 commit 306050e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inst/htmlwidgets/plotly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ HTMLWidgets.widget({
77
},
88

99
resize: function(el, width, height, instance) {
10-
if (instance.autosize) {
10+
if (instance.autosize && el.isConnected) {
1111
var width = instance.width || width;
1212
var height = instance.height || height;
1313
Plotly.relayout(el.id, {width: width, height: height});

0 commit comments

Comments
 (0)