Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome turns cursor to default instead of pointer when hovering links after mouseup event that returns false

I might be missing something because this thing is plain weird. Here's the code:

$(document).ready(function() {
    $(document).mouseup(function(){
        return false;
    });
})
<a href="">qagq3gq343</a>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js">    </script>

It just returns false on mouseup event. But what it does in Chrome, is that when hovering over links, after an mouseup event, the cursor is default and not pointer.

You can replicate it above by running the snippet, then clicking anywhere within the snippet not on the link, then moving your cursor over the link.

Any ideas?

like image 537
Catalin Avatar asked Jul 22 '16 15:07

Catalin


1 Answers

It seems like the only solution is a css one:

a, a:hover, a:active, a:visited {
  cursor: pointer !important;
}
like image 148
Catalin Avatar answered Nov 03 '22 14:11

Catalin