question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Href does nothing

See original GitHub issue

Describe the bug The href property when set just sets an href to the div, but it does nothing if you click on it

To Reproduce Steps to reproduce the behavior:

Use below for tree nodes:

var json = [
	{
		text: "Main",
		icon: "fa fa-inbox",
		nodes: [
					{
						text: "Google",
						href: "www.google.com"
					}
				]
	}
];

Then open the tree an click on “Google”, see it has an ‘href’ but nothing happens

Expected behavior When clicked, the google should open (or in a new tab if clicked with the middle mouse button)

Screenshots

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Firefox
  • Version 74.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Flyer53commented, Mar 25, 2020

@chniter @vinimk I further updated my fork to automatically navigate to the href attr value of the clicked item.

0reactions
chnitercommented, May 17, 2020

Please open new issue if you have always the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make a HTML link that does nothing (literally nothing)
Does it makes sense to use an a tag without a link? Usually no, it's probably better to use a button element instead,...
Read more >
How to make an anchor tag refer to nothing? - Tutorialspoint
To make an anchor tag refer to nothing, use “javascript: void(0)”. The following link does nothing because the expression "0" has no effect ......
Read more >
What is the difference between href ... - Heitor Helmer Herzog
The Short Answer: href="#" will scroll the current page to the top. href=”javascript: void(0)” will do nothing. href="#0" will do nothing.
Read more >
How to make an anchor tag to do nothing? - StudyZone4U.com
To prevent reloading a page when a link clicked is something like preventing the default behavior of an element. It can be achieved...
Read more >
Back to Basics: Non-Navigating Links for JavaScript Handling
The Short Answer: href="#0" · It doesn't navigate · It makes it obvious that this it's a do-nothing navigation · Link looks reasonable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found