Reputation: 1425
I have a chrome extension which allows to write on screen in chrome tabs. The default behaviour looks like :
It works be simply inserting a canvas
tag in the DOM and doing all the stuff in it. It works well in all sites. However, chrome PDF viewer behaves strangely when I use it :
I don't think there is any issue with the extension because it works on all other sites. I think there is an issue with chrome PDF viewer itself.
I can attach the code here if asked in comments.
Upvotes: 1
Views: 306
Reputation: 425
Ok, so I tried to replace all innerHTML += <value>;
by insertAdjacentHTML("afterbegin",<value>);
And now it's working fine.
It's because your canvas must be on top to ensure it will works on every website.
The z-index
propery is not enough for that.
Hope that helped !
Upvotes: 1