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.