ipfs-desktop icon indicating copy to clipboard operation
ipfs-desktop copied to clipboard

"View on IPFS gateway" opens link twice

Open ExpandingS opened this issue 3 years ago • 4 comments

Describe the bug In the explore tab, clicking this button will open the link twice. image

To Reproduce Steps to reproduce the behavior:

  1. Press "View on IPFS gateway"
  2. The link will be opened in your default browser in two tabs.

Expected behavior It only opens in one tab.

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: firefox 102.0b9
  • Version IPFS desktop UI v2.15.0

ExpandingS avatar Jun 19 '22 06:06 ExpandingS

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.

welcome[bot] avatar Jun 19 '22 06:06 welcome[bot]

This seems to happen with other links, too. In the settings tab, 'public gateway' has the same behavior. image

ExpandingS avatar Jun 19 '22 07:06 ExpandingS

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.

welcome[bot] avatar Dec 02 '22 07:12 welcome[bot]

@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 image

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.

SgtPooki avatar Jun 20 '22 17:06 SgtPooki

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.

whizzzkid avatar Dec 02 '22 07:12 whizzzkid