diff --git a/CHANGELOG.md b/CHANGELOG.md index ca03588..465cbbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ ### Changelog ### #### v1.0.0-alpha2 - TBD #### - * Fix `data-html2canvas-ignore` attribute - * Fix decimal `letter-spacing` values + * Fix scroll positions for CanvasRenderer (#1259) + * Fix `data-html2canvas-ignore` attribute (#1253) + * Fix decimal `letter-spacing` values (#1293) #### v1.0.0-alpha1 - 5.12.2017 #### * Complete rewrite of library diff --git a/src/Clone.js b/src/Clone.js index f156bdd..53e94bd 100644 --- a/src/Clone.js +++ b/src/Clone.js @@ -253,7 +253,7 @@ export class DocumentCloner { } this.inlineAllImages(clone); if (node.scrollTop !== 0 || node.scrollLeft !== 0) { - this.scrolledElements.push([node, node.scrollLeft, node.scrollTop]); + this.scrolledElements.push([clone, node.scrollLeft, node.scrollTop]); } switch (node.nodeName) { case 'CANVAS': diff --git a/tests/reftests/overflow/overflow.html b/tests/reftests/overflow/overflow.html index 6528dc4..cb21d93 100644 --- a/tests/reftests/overflow/overflow.html +++ b/tests/reftests/overflow/overflow.html @@ -65,6 +65,20 @@ +
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s + with the release of
a
Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. + + +
position:relative within a overflow:hidden element

+ + Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. + +
+ +