Comments (3)
With the single popup mutex, the lock is never released if the user clicks X as oppose to "Cancel". To fix it, user must restart browser or enable/disable the extension.
While working on handling the beforeunload
event, it appears it's not entirely deterministic and depends on user interaction with the window. I have not been able to find any specific patterns, even if I click within the window, sometimes the beforeunload
is simply not called. If I open the debug console on popup with an debugger statement, then the unload event it always called.
MDN: As of Chrome 60, the confirmation [will be skipped](https://chromestatus.com/feature/5082396709879808) if the user has not performed a gesture in the frame or page since it was loaded. Pressing F5 in the page seems to count as user interaction, whereas mouse-clicking the refresh arrow or pressing F5 with Chrome DevTools focused does not count as user interaction (as of Chrome 81).
A better solution will be to actually listen to the closing (finally) on windows.create (returns a Promise).
I'll get back to this issue when I have a good solution, working on it now.
from nos2x.
Got a working solution here, it will listen to the close event and perform a call to handlePromptMessage with condition 'no' if the prompt object is still there after window close:
Previously if users dismissed with X, the extension wouldn't be able to popup new windows.
PR incoming!
from nos2x.
Nice animation.
from nos2x.
Related Issues (20)
- relays’s input‘s bug HOT 1
- Can I manage my private key. Easily add and remove.
- How do nostr: links work? HOT 2
- Error with Yarn HOT 2
- support delegated event signing NIP-26
- Firefox: Can't save private key HOT 2
- Support for master password HOT 5
- CSS improviments HOT 2
- no license field error on build HOT 1
- read relays from metadata.nostr.com and allow saving to extension db
- I'm able to get the nos2x extension on my chrome. However, could'nt get it to log in to Toastr.space as error shows undefined. HOT 1
- unable to revoke allow policies HOT 1
- multiple profile support HOT 1
- key import HOT 1
- Denying load / Resources must be listed in the web_accessible_resources manifest key HOT 4
- Feature: read nsec from an encrypted qrcode HOT 6
- [Feature Request] Simplify Relay URL Entries
- [Feature Request] Store the nsec as ncryptsec HOT 5
- [Feature Request] Store multiple nsec HOT 2
- Problem with webextension-polyfill HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nos2x.