Jump to content

jQuery Draggable - Prevent Dragging off of page


Go to solution Solved by 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).

Edited by teynon
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.