'How do I make the modal dialog draggable but only within the confines of the viewable window?
So I have this dialog window
window.$(".modal-dialog).draggable();
Its draggable, but sometimes it can also go outside of the frame of the window and get lost. Any idea on how to make so that a user can only drag it within their viewable window?
I've tried already the containment: with values such as parent, window and container but that limits it to only a certain area for dragging and sometimes the user can still drag it out of the window.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
