-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Careful. Sometimes the callback will not fire. #518
Comments
Put markup to your html example. |
I tried... it removes the < and > signs... |
@NadavB please use a jsfiddle or jsbin to actively demonstrate the issue. (Also, please note that you can include in HTML in comments if you use the markdown syntax, i.e. three backticks above and below your code block. For example: <div></div> will show up as <div></div> Still, please include a link to a jsFiddle.) |
Second try: <div dir='ltr'>test test test test</div> This blocks the html2canvas |
Everything's fine for me. Please include a link to a jsFiddle |
|
Okay. Here it is: http://jsfiddle.net/ngdzLec2/ Do the follows:
Note that I'm using here TinyMCE version 4.1 ; if you change the TinyMCE version to 4.0, everything works fine. So I assume there is some collision between TinyMCE and Html2Canvas, in the newest version of TinyMCE. |
I'm always seeing the "worked" alert, even after using bold (Firefox 36). What browser breaks? |
Sorry - I forgot to write it - Chrome |
tl;dr: the gradient TinyMCE is using on pressed buttons isn't (yet) supported--see #469. Looks like a bug, and it also affects IE. I simplified the test case here: At first glance there seem to be at least two things going wrong here, only one of which I think is relevant to the actual problem here. If you look at the JS console log, the message given in the logged Promise rejection is that there was no proxy configured. html2canvas is trying to use a proxy because it thinks the iframe used by TinyMCE is on a different origin, since its The error that actually reaches the rejection handler (the second function passed to The problem here is that the gradient applied to the pressed buttons in TinyMCE uses a named color ("silver" as opposed to hex values), and I haven't yet finished #469, which should handle that... :/ Looks like I have a weekend project. In the meantime, please feel free to follow that issue as the root cause, and close this one. I'm still a bit curious as to why it completes error-free on Firefox, but it doesn't matter much since the resulting canvas isn't very useful anyway... (Sorry my analysis is so verbose, I've just been watching Elementary... :) |
Thanks for investigation! Btw - it would be nice to add some protection mechanism, so if the canvas can't be rendered - an error callback will be fired (+timeout) |
The way to handle an error is to invoke the script like Also, you can specify a per-image load timeout (see the |
@NadavB I see how old this is now, but this issue should have been resolved with the patch that was landed a few months back, resolving #469. Feel free to test it yourself, or verify with the jsFiddle I mentioned before in my Really Long Comment: Please close this issue if it's resolved for you. :) |
@usmonster thanks! Unfortunately, I won't be able to do so anytime soon, so sorry for that.... |
I'm also getting promise rejected errors when trying to use this to screencap a Google Map, not sure how to fix the issue. See our test page. |
When having this element in the DOM it might never end:
(hope you guys see the div dir='ltr')
That's dangerous...
The text was updated successfully, but these errors were encountered: