-
Notifications
You must be signed in to change notification settings - Fork 103
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
Draggable feature in modal popup #14
Comments
@lafiza <button type="button" class="btn btn-primary" (click)="staticModal.show()">Static modal</button>
<div class="modal fade" bsModal #staticModal="bs-modal" [config]="{backdrop: 'static'}"
tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<!-- Add ngDraggable Here -->
<div class="modal-content" ngDraggable>
<div class="modal-header">
<h4 class="modal-title pull-left">Static modal</h4>
<button type="button" class="close pull-right" aria-label="Close" (click)="staticModal.hide()">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
This is static modal, backdrop click will not close it.
Click <b>×</b> to close modal.
</div>
</div>
</div>
</div> I can test it in ngx-modal later. |
I use something similar to that, but found an issue with not being able to use the mouse to select any text in the modal-content area, so I tried to use a handle for the modal-header like this:
but with this, the user must click on an area outside the h4 but part of the modal-header to be able to drag. I've put the handle on the h4 as a workaround, but I could see this being an issue in some scenarios. Can you make the handle work on child elements, or allow for multiple handles? |
@clabough I use your h4 approach, thanks. In order to make the whole header as a drag handle I modified bootstrap styles a bit:
|
can we have this draggable property for a modal popup ?
I am using ngx-modal to create a modal popup
The text was updated successfully, but these errors were encountered: