This is because you are clicking on something that is on the same file. What happens if you click on something that is on a different file? Is it opining in that tab or is it opening a new tab?
Perhaps I misunderstood the original post – if clicking on something that is in a different file the editor will reuse an existing tab of that file and put the focus on the target. If no existing tab is found, a new one will be created. A duplicate tab is never produced.
The point is this, the way browsers and IDEs handle this is very different and it’s either one or the other, because hybrid approach look odd.
I appreciate this, but at least for my use case (and @scambier’s, it appears), the IDE approach is a much better user experience. I think both can reasonably be accommodated by introducing a configuration flag. Humbly I think this could reasonably be a core functionality and not something that requires resorting to a 3rd party plugin.
Additionally it seems implementing this in a consistent way is not easily done with a 3rd party plugin using the current API. Taken from the no duped leaves
plugin description:
Word of warning
This plugin modifies the default behavior of Obsidian.
Internally, it overwrites the public function
openLinkText()
, which is called when you click on a link in a note. This also affects other plugins that use this function - like Omnisearch -, but does not work on core features like the File Explorer.