Praneet Dixit
Praneet Dixit

Reputation: 1425

Chrome PDF viewer malfunctioning when extension in started

I have a chrome extension which allows to write on screen in chrome tabs. The default behaviour looks like :

enter image description here

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 :

Before - enter image description here

After - enter image description here

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

Answers (1)

CreaZyp154
CreaZyp154

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

Related Questions