huda
huda

Reputation: 4297

How to keep open Firefox extension popup on navigation click button

I am developing Firefox extension using jetpack, problem is that when I clicked on navigation button, popup is open & when click somewhere else its got closed. Can I overwrite its automatic closing mechanism, I want to keep it open & should be closed by user with close button which will be on the popup. Any clue?

Upvotes: 1

Views: 1239

Answers (1)

Noitidart
Noitidart

Reputation: 37238

Updated and proper solution: Avoid panel to autoHide in Firefox extension

With SDK methods I personally struggled to get it to not show. The way I did it though is by adding a popuphiding event to the panel and preventing default because using noautohide property didn't work. Here is me trying to get help on the noautohide property: https://forums.mozilla.org/addons/viewtopic.php?f=27&t=16038&p=33346#p33346 So your best bet is get the id of the panel and addEventListener on popuphiding and do event.preventDefault. Then when you need to close remove that event listener and call popup close function. You can see the popuphiding solution in this SO topic: https://stackoverflow.com/a/21668101/1828637

Upvotes: 2

Related Questions