question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught Error: IndexSizeError: DOM Exception 1

See original GitHub issue

Uncaught Error: IndexSizeError: DOM Exception 1 when it execute ctx.drawImage(canvas, bounds.left, bounds.top, bounds.width, bounds.height, 0, 0, bounds.width, bounds.height);
while my code want to html2canvas.render a display:none element;

What causes this error ?

The error track : (anonymous function) html2canvas.js:2828 _html2canvas.Renderer html2canvas.js:2552 options.complete html2canvas.js:2667 start html2canvas.js:2082 img.onload

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ydannegcommented, Dec 10, 2014

I confirm https://github.com/niklasvh/html2canvas/pull/320 fixes this IE issue if bound.left is negative. This one happens if we try to render not visible (scrolled) components.

Thank you so much.

0reactions
janainaemiliacommented, Jun 14, 2017

I get this error in Microsoft Edge. I noticed that I got this error because of the padding-left in the element that I was selecting to render.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IndexSizeError: DOM Exception 1: Index or size was negative ...
Hey guys, I really need help. I have a music application, The music streaming work fine in Firefox and chrome browser but Safari...
Read more >
179627 - IndexSizeError: DOM Exception 1 in page ... - Monorail
Hi, the error is persists. i check it on several machine (with same OS and chrome version as mentioned above) and it come...
Read more >
#13683 (IndexSizeError: DOM Exception 1: Index or size was ...
The following JS error is logged to the console and no alert appears: [Error] IndexSizeError: DOM Exception 1: Index or size was negative,...
Read more >
Issue 179627 in chromium: IndexSizeError: DOM Exception 1 in ...
Labels: Webkit-JavaScript Pri-2 Via-Wizard Type-Bug OS-Windows New issue 179627 by ***@gmail.com: ... Uncaught Error: IndexSizeError: DOM Exception 1
Read more >
indexsizeerror: index or size is negative or greater than the ...
To get back to your question, Uncaught Error: IndexSizeError: DOM Exception 1 usually appears when the square you're trying to cut is bigger...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found