It can be hard to describe without copying and pasting a ton of code here, but I will try.
I needed to create a custom draggable object using javascript - I used jquery in the past, but it did not work for this project. I mainly work, except when the user clicks on an object (DIV) and drags it around the page, his or her cursor goes into the classic i-beam text selector.
No matter what I try, I cannot turn off this cursor. I tried to put something like.
this.style.cursor = 'pointer';
in the "onmousedown" function of the div in question, but as soon as you start dragging, blammo, you have an i-beam cursor. The same is true if I put the above code in the actual drag and drop function.
I tried disabling text selection in the entire document using css (not really a solution, as I want people to be able to copy / paste to this site, but just see if it works), and still the cursor changes while the user drags.
I think what I'm really looking for is a way to temporarily disable the i-beam cursor appearing on my page altogether.
Ok, thanks for any help.
source
share