Have you ever noticed that when you click on a link in Chrome (but not Safari or Firefox), the cursor changes from pointer to arrow? Is there a way to prevent this behavior so that the pointer remains even after clicking, while still hovering over the link?
UPDATE: After conducting some tests, it appears that the only time one would want the cursor to stay as a pointer after clicking on a link is if the link triggers a JavaScript event rather than loading a new page.
<a href="test">Test</a>
// Using jQuery
$("a").click(function(event) { event.preventDefault(); }
By utilizing the above code and preventing the default action, you can maintain the pointer cursor after clicking. This approach works well for actions like DOM manipulation or AJAX requests.
However, an issue arises with history.pushState():
<a href="test">Test</a>
// Implementing jQuery
$("a").click(function(event) {
history.pushState(arg1, arg2, url);
event.preventDefault();
}
In this scenario, the pointer cursor does change to an arrow. Any suggestions on how to address this behavior and prevent the cursor from changing?