By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,932 Members | 1,529 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,932 IT Pros & Developers. It's quick & easy.

Dragging & moving DIVs

P: n/a
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]: <80**************************@posting.google.com >
[2]: http://stroh.scan-plus.de/widgets/

--
- Do you like WYSIWYG systems?
- Definitely not. I can type faster than I can point.
And my mother told me that pointing is impolite.
(c) Andrew S. Tanenbaum's personal FAQ
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Igor Stroh wrote:
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

--
TC

Jul 23 '05 #2

P: n/a
Tomasz Cenian wrote:
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).


Thanks, looks like it solved the problem :)

Cheers,
Igor
Jul 23 '05 #3

P: n/a
also make sure you use event.cancelBubble=true; event.returnValue=false in
IE;
"Igor Stroh" <st***@scan-plus.de> wrote in message
news:ch**********@news.scan-plus.de...
Tomasz Cenian wrote:
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).


Thanks, looks like it solved the problem :)

Cheers,
Igor

Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.