scalize icon indicating copy to clipboard operation
scalize copied to clipboard

Image not fully loaded in memory. Parent width set to zero.

Open matpoppl opened this issue 7 years ago • 0 comments

I've encountered a problem on iPad while scrolling. The new created image wasn't fully loaded in memory and the width was 0 and the while parent container had width set to 0.

I've tinkered a little bit and the easiest solution is to get the image directly from the DOM that is already available in elem.find('.target')[0]

My proposal is to change the scalize.js:

From:

var image = new Image();
image.src = elem.find('.target').attr("src");

To:

var image = elem.find('.target')[0];

matpoppl avatar Nov 16 '17 17:11 matpoppl