Open sajeshcherian opened 2 years ago
I just try to use the latest docker container, I do no configuration/modification on the code.
I went with the manual installation instead of a docker image. Not sure how that made a difference.
It is because the window.postMessage
is overwritten by the widget/index.js
, see this line, and when the iframe send the resize message, the real window.postMessage
didn't called.
To fix it there are some ways:
cusdis.es.js
as a module use a module attribute <script src="cusdis.es.js" module></script>
I am self-hosting cusdis on https://comments.simbly.me. The current
widget/index.js
is not resizing the iframe and as a result the iframe ends up with vertical scrollbars. I compared myindex.js
script with that of Neils' (@din14970) on his blog (https://nielscautaerts.xyz/) and found it to be slightly different. For reference, his looks like this: https://cusdis.nielscautaerts.xyz/js/cusdis.es.js. So do the rest of the cusdis implementations I was looking at on the web, including the hosted version.I couldn't figure out the difference very well, but I replaced my JS file with Neils' and the vertical scrollbar issue is gone. (Everything else was working fine anyway). Replacing that JS file is all I did to make the scrollbar go away.