style.cursor on IE

D

datvong

IE does not change the cursor immediately after a style.cursor is
set. In the following sample, I have 2 divs, one inside another. The
inner has a cursor of crosshair, outer a hand.
If I click on the inner div, causing it to disappear, the mouse would
be over the outer div, but the cursor is still a crosshair. The
cursor will change to the correct cursor when I move the mouse.

<div style='cursor:hand;width:300;height:300'>
<div id='inner' style='cursor:crosshair;width:300;height:50'
onclick="this.style.display='none'">
Click to make this div disappear
</div>
</div>


Is there any way to force the cursor to change? On work-around is
doing a resizeBy(-1,0); resizeBy(1,0), but that is impractical for my
application.


Thansk,
Dat.
 
D

datvong

IE does not change the cursor immediately after a style.cursor is
set.  In the following sample, I have 2 divs, one inside another.  The
inner has a cursor of crosshair, outer a hand.
If I click on the inner div, causing it to disappear, the mouse would
be over the outer div, but the cursor is still a crosshair.  The
cursor will change to the correct cursor when I move the mouse.

<div style='cursor:hand;width:300;height:300'>
   <div id='inner' style='cursor:crosshair;width:300;height:50'
onclick="this.style.display='none'">
    Click to make this div disappear
   </div>
</div>

Is there any way to force the cursor to change?  On work-around is
doing a resizeBy(-1,0); resizeBy(1,0), but that is impractical for my
application.

Thansk,
Dat.

resizeBy also does not work if there are multiple tabs in IE.
and an access exception occurs if the mouse is down.
 
D

David Mark

IE does not change the cursor immediately after a style.cursor is
set.  In the following sample, I have 2 divs, one inside another.  The
inner has a cursor of crosshair, outer a hand.
If I click on the inner div, causing it to disappear, the mouse would
be over the outer div, but the cursor is still a crosshair.  The
cursor will change to the correct cursor when I move the mouse.

<div style='cursor:hand;width:300;height:300'>

The "hand" style is not standard. Use it only as a fallback for
"pointer." And 300 what?
   <div id='inner' style='cursor:crosshair;width:300;height:50'
onclick="this.style.display='none'">
    Click to make this div disappear
   </div>
</div>

Is there any way to force the cursor to change?  On work-around is

Only hacks. I wouldn't worry about it.
doing a resizeBy(-1,0); resizeBy(1,0), but that is impractical for my
application.

Or any application.
 
D

datvong

Donale Anadell wrote this in the microsoft.internetexplorer forum...



I tried it and it inexplicably works!
 
D

David Mark

Donale Anadell wrote this in the microsoft.internetexplorer forum...


I tried it and it inexplicably works!

It isn't hard to explain at all if you think about it. IE was
momentarily showing the cursor for the wrong element. You changed
that cursor. Unfortunately, you changed it to "hand."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top