adambullmer / vue-cli-plugin-browser-extension

Browser extension development plugin for vue-cli 3.0
GNU Lesser General Public License v3.0
426 stars 76 forks source link

Registering a new devtools panel causes infinite panels opened, only at firefox. #83

Open ghost opened 4 years ago

ghost commented 4 years ago

Bug Description Registering a new devtools panel causes infinite panels opened, only at firefox.

Every time i click "panel" it opens another instance of "panel".

firefox devtools

To Reproduce

Expected behavior As happens in chrome, a panel should only be added once.

Name Version
vue-cli-plugin-browser-extension 0.24.0
Operating System MacOS Mojave
Node v13.12.0
NPM/Yarn 6.14.4
vue-cli 4.0.5
browser Chrome, latest
MCFreddie777 commented 3 years ago

I think this is correct behaviour. The devtools.html is added when the devtools are open and already contains dynamically injected script main.js. This script then creates new panel from devtools.html. Therefore you got into loop (dynamically loaded script creates new panel from itself).