ipfs-desktop
ipfs-desktop copied to clipboard
"View on IPFS gateway" opens link twice
Describe the bug
In the explore tab, clicking this button will open the link twice.

To Reproduce Steps to reproduce the behavior:
- Press "View on IPFS gateway"
- The link will be opened in your default browser in two tabs.
Expected behavior It only opens in one tab.
Screenshots

Desktop (please complete the following information):
- OS: Windows 10
- Browser: firefox 102.0b9
- Version IPFS desktop UI v2.15.0
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
- "Priority" labels will show how urgent this is for the team.
- "Status" labels will show if this is ready to be worked on, blocked, or in progress.
- "Need" labels will indicate if additional input or analysis is required.
Finally, remember to use https://discuss.ipfs.io if you just need general support.
This seems to happen with other links, too. In the settings tab, 'public gateway' has the same behavior.

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
- "Priority" labels will show how urgent this is for the team.
- "Status" labels will show if this is ready to be worked on, blocked, or in progress.
- "Need" labels will indicate if additional input or analysis is required.
Finally, remember to use https://discuss.ipfs.io if you just need general support.
@ExpandingS Thanks for submitting this issue and the details necessary to reproduce this easily.
@lidel for context
I was able to reproduce this issue on IPFS Desktop

But not using ipfs-webui by accessing the same webui outside of electron using http://127.0.0.1:5001/ipfs/bafybeiednzu62vskme5wpoj4bjjikeg3xovfpp4t7vxk5ty2jxdi4mv4bu/#/explore/QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D
We need to do some more investigating to figure out if this bug is still occurring when the latest webui version is used inside of electron, and we'll have to wait for a new IPFS Desktop release to do that.
Confirmed:
- this issue still exists with the lates webui inside electron.
- this is non issue on localhost loaded via web browser.
Smelly Code: https://github.com/ipfs/ipfs-desktop/blob/main/src/webui/open-external.js
Notes:
- Looks both events are being handled somehow causing links to open twice when clicked from within ipfs-desktop.
- Investigate and Fix.
Action: moving this to ipfs-desktop issue board.