PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.59k stars 369 forks source link

[BUG] Open with side panel is not working #1087

Open AndonMitev opened 1 month ago

AndonMitev commented 1 month ago

What happened?

Hey i have nextjs project where i tested to display with sidepanel but is not working

I have created /src/tabs/sidepanel.tsx

and then in manifest like this:

"manifest": {
    "host_permissions": [
      "https://*/*"
    ],
    "permissions": [
      "tabs",
      "sidePanel"
    ],
    "side_panel": {
      "default_path": "tabs/sidepanel.html"
    }
  }

nothing happens when i click on the extension.

I've also tried with [with-sidepanel](https://github.com/PlasmoHQ/examples/tree/main/with-sidepanel) but nothing is happening any ideas?

Version

Latest

What OS are you seeing the problem on?

No response

What browsers are you seeing the problem on?

No response

Relevant log output

No response

(OPTIONAL) Contribution

Code of Conduct

duoluodexiaoxiaoyuan commented 1 month ago

I have also encountered this issue, may I ask if you have solved it?

azurespheredev commented 1 week ago

I was able to resolve it by manually adding a background script to the project.

// src/background.ts

chrome.action.onClicked.addListener(() => {
  chrome.sidePanel.setPanelBehavior({ openPanelOnActionClick: true });
});