Dragging & moving DIVs

I

Igor Stroh

Hi there,

I'm trying to implement some kind of a widget toolkit
which is able to display moveable dialogs. It works
pretty smooth so far, but there's one problem: when
a dialog is moved to fast on IE, the mouse pointer
jumps out of the bounds of the "movement-handle",
i.e. the title bar of the dialog. I found a thread[1] in c.l.j
with a great piece of code from Yann-Erwan Perio
which circumvent the problem of "slow" event handling
by using setTimeout. Unfortunatelly the code is extensively
making use of closures, which are extremely hard to read
and to maintain (at least for me).

So my question is, could someone have a look at [2]
and give me a hint of how I could use setTimeout there
in order to speed up the movement?

TIA,
Igor

[1]: <[email protected]>
[2]: http://stroh.scan-plus.de/widgets/
 
T

Tomasz Cenian

Igor said:
Hi there,

I'm trying to implement some kind of a widget toolkit
which is able to display moveable dialogs. It works
pretty smooth so far, but there's one problem: when
a dialog is moved to fast on IE, the mouse pointer
jumps out of the bounds of the "movement-handle",
i.e. the title bar of the dialog.

For IE, when (drag) try to register onmousemove event for the whole document
body, not just for the title bar. Detach the event as soon as (!drag).

Regards
 
I

Igor Stroh

Tomasz said:
For IE, when (drag) try to register onmousemove event for the whole document
body, not just for the title bar. Detach the event as soon as (!drag).

Thanks, looks like it solved the problem :)

Cheers,
Igor
 
J

J. J. Cale

also make sure you use event.cancelBubble=true; event.returnValue=false in
IE;
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top