Skip to content

Commit

Permalink
remove isConnected check for images (not working)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Mar 21, 2020
1 parent da1050f commit 559fe0f
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/gwt/panmirror/src/editor/src/nodes/image/image-view.ts
Expand Up @@ -151,17 +151,6 @@ export class ImageNodeView implements NodeView {
if (this.imageAttributes) {
initResizeContainer(this.dom);
}

// if the img is not yet connected to the DOM then poll until it is
// and update the image size
const updateSizeWhenConnected = () => {
if (this.img.isConnected) {
this.updateImageSize();
} else {
setTimeout(updateSizeWhenConnected, 50);
}
};
updateSizeWhenConnected();
}

public selectNode() {
Expand Down

0 comments on commit 559fe0f

Please sign in to comment.