Mouse Drag-and-drop Problem

L

Louis

I have a problem in doing a drag-and-drop using javascript in Firefox. I
can perform the operation when I can see the source and destination.
However if the destination is beyond the browser window, and when I drag
the mouse to the bottom of the browser window, the window will not
scroll. (I know when I reach the top as my y-coordinate will be 0).

In normal browser environment, when I drag the mouse and it reaches the
bottom or the top, the browser window automatically scrolls, if there is
room.

In my application, I use onmousemove to simulate the dragging, and the
browser window will not scroll when I reach the bottom (or the top).

My question is, how do I detect the size of the browser window? If I
know the absolute height of the browser window, then I can scroll the
window when I reach the bottom.

Thank you for your help.
 
D

David Mark

I have a problem in doing a drag-and-drop using javascript in Firefox. I
can perform the operation when I can see the source and destination.
However if the destination is beyond the browser window, and when I drag
the mouse to the bottom of the browser window, the window will not
scroll. (I know when I reach the top as my y-coordinate will be 0).

It will be 0 if that is the scroll position of the page (and the HTML
element has no borders or margins.)
In normal browser environment, when I drag the mouse and it reaches the

What do you consider normal? IE?
bottom or the top, the browser window automatically scrolls, if there is
room.

Some do.
In my application, I use onmousemove to simulate the dragging, and the
browser window will not scroll when I reach the bottom (or the top).

My question is, how do I detect the size of the browser window? If I

This is a popular topic today. See the thread that was started by the
FAQ server a few hours ago.
 
T

Thomas 'PointedEars' Lahn

Louis said:
My question is, how do I detect the size of the browser window?

The corresponding FAQ entry has been automatically posted here again
7 hours and 15 minutes before your posting.


PointedEars
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top