View Full Version : Over-riding I-beam cursor onmousedown-drag
09-01-2011, 06:08 PM
I have created a drag script and am having a problem with the cursor. When I hover over the div, the cursor becomes "move" as I want it to be. But if I click, then drag it changes to the I-beam cursor. I am wondering what I can do to get it to stay "move" or whatever I'd like it to be. I know things like onselectstart, etc, but that doesn't seem to do anything. Thanks for your time. :)
09-01-2011, 06:31 PM
CSS could be of help here instead (not sure, but it's worth a try).
Just set the CSS to use cursor:move; or cursor:move !important; as one of its styles and see if that helps.
09-01-2011, 10:20 PM
Hmm, this is interesting. I can seem to get it to work when I have the div on the page already, but if I use createElement and create a div it gets the I-beam cursor.
But... if I have a div on a page, and then use createElement, the create element one will work.
09-01-2011, 10:23 PM
You could do that right after you create the element.
That's the same basic idea as before, but it might overcome the issue with generated divs not working...
09-01-2011, 10:31 PM
Yeah, I've tried that one, before, and now. The I-beam still pops up. Not sure if you use twitter, but if you do and you have done dragged the popup thing that you can get there, there's goes to an ibeam too. So I'm wondering if it's just because of createElement or not.
09-01-2011, 10:36 PM
Could be. I can't say that I've ever tried to tackle this specific issue before.
Which browser(s) does this happen in?
09-01-2011, 10:38 PM
Last thing I can think of for now is to add an "onmouseover" attribute to the new div elements that changes the cursor. Maybe user interaction with the page will knock the sense back into the div?
09-01-2011, 10:50 PM
Nope, that didn't knock any sense into that stupid createdElement. lol
09-01-2011, 11:51 PM
Can you post a simple page showing this issue? And what browser are you using?
09-02-2011, 02:39 AM
Simple example page: http://vorogh.com/Example/
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.