Skip to content

Option for containment on ui-dialog or/and improvement of documentation #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lichtkabouter opened this issue Apr 10, 2015 · 1 comment

Comments

@lichtkabouter
Copy link

Within ui-dialog there is a way to set the appendTo. I presumed it would feed the boundries to _makeDraggable as well. As I found out the containment of a dialog is set to 'document'.

I would suggest making an option which can be used to set the containment:
$( "selector" ).dialog( { containment: "foo" } );

The short-term solution to handle this is by extending the documentation by showing how containment can be set without editing sources:
$( "selector" ).dialog().dialog( "widget" ).draggable( { containment: "foo" } );

@scottgonzalez
Copy link
Member

This gets way too complicated because it also affects positioning. The current implementation supports the overwhelming majority of use cases. If you need fine grained control, you should do it yourself.

On a side note, this is not the place to suggest API changes, that would be http://bugs.jqueryui.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants