Jump to content

jQuery Draggable - Prevent Dragging off of page


teynon

Recommended Posts

http://tomsfreelance.com/windows_virtual_security/

 

I'm working on a little project to help people learn / apply knowledge to prevent things like phishing attempts, etc. I have started creating a virtual windows setup in jQuery / html / css.

 

Everythings going ok, except dragging a window (open outlook, doubleclick the title bar or just start dragging the titlebar). When the user drags the window to the right or bottom to the extent that the mouse touches the edge, the page starts to stretch.

 

Does anyone know how to prevent this?

 

There is currently overflow: hidden; set on html and body. I'd prefer not to set the containment on the draggable (I can put it to "body"), but then I'd like the windows to be able to partially disappear off screen (the way it will in windows).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.