0

As stated in the title, the Chrome extension I've been developing closes whenever I click on the page, and I noticed that this happens with all the other extensions that I have.

I really have 2 doubts:

  1. Whether it is actually possible to leave the extension open regardless of whether the user clicks the screen or not;

  2. If it is possible to force the extension to open via Content_Script;

xMajorFox
  • 3
  • 1

1 Answers1

0

I presume by "extension closes" you mean that a popup in your extension closes.

This is indeed normal behavior that you cannot override if you click away.

It's also not possible to open a popup from your code in Chrome.

So if you need some UI that co-exists with a page you interact with, you'd need to inject it into the page itself. Probably using Shadow DOM so that the page's styling doesn't interfere with yours.

Xan
  • 74,770
  • 16
  • 179
  • 206
  • Thanks for your response. It clarified my doubts. I will keep that in mind. – xMajorFox Jun 05 '20 at 15:47
  • @xan Please check my question if you know the solution [here](https://stackoverflow.com/questions/63500467/pause-a-download-with-chrome-doesnt-work-as-expected) – good_shabes Aug 20 '20 at 13:37