p2plabsxyz / dscan

A decentralized storage and file-sharing tool that uploads content to IPFS and generates decentralized QR codes.
https://chromewebstore.google.com/detail/dscan-own-your-identity-o/idpfgkgogjjgklefnkjdpghkifbjenap
MIT License
36 stars 26 forks source link

bug: popup window fails to gain focus after email verification #56

Open akhileshthite opened 7 months ago

akhileshthite commented 7 months ago

After a user clicks to log in, a popup window is created for email verification. However, once the email is verified and the user is expected to return to the popup, the window does not come to the forefront as intended, even after invoking popupWindow.focus(). Additionally, popupWindow is logged as null in the useEffect hook, suggesting that the window reference is lost.

Steps to Reproduce

  1. Enter your email and click on the 'Login' button to trigger the popup window.
  2. Navigate away from the popup window to check email for verification.
  3. Verify the email.
  4. Expect the popup window to come into focus automatically.

code: https://github.com/p2plabsxyz/dscan/blob/aab41097115b956fc9cfe47f633e74069da30281/src/popup.jsx#L56

https://github.com/p2plabsxyz/dscan/blob/aab41097115b956fc9cfe47f633e74069da30281/src/popup.jsx#L114