Closed servicepartnerplatform closed 8 years ago
v0.1.5 adds support for the keyboard option. You can now set [keyboard]="false"
. See the following example:
<button type="button" class="btn btn-default" (click)="modal.open()">Open me!</button>
<modal #modal [keyboard]="false" [backdrop]="'static'">
<modal-header [show-close]="false">
<h4 class="modal-title">I'm a modal!</h4>
</modal-header>
<modal-body>
Hello World!
</modal-body>
<modal-footer [show-default-buttons]="true"></modal-footer>
</modal>
Thanks to @Beardles for the submission.
Thanks for adding this. So I take it I was the second one to ask for this? On Mar 5, 2016 11:18 AM, "Douglas Ludlow" notifications@github.com wrote:
v0.1.5 https://github.com/dougludlow/ng2-bs3-modal/releases/tag/v0.1.5 adds support for the keyboard option http://getbootstrap.com/javascript/#modals-options. You can now set [keyboard]="false". See the following example:
<button type="button" class="btn btn-default" (click)="modal.open()">Open me!
<modal #modal [keyboard]="false" [backdrop]="'static'"> <modal-header [show-close]="false">
I'm a modal!
</modal-header> <modal-body> Hello World! </modal-body> <modal-footer [show-default-buttons]="true"></modal-footer>
Thanks to @Beardles https://github.com/Beardles for the submission.
— Reply to this email directly or view it on GitHub https://github.com/dougludlow/ng2-bs3-modal/issues/7#issuecomment-192680620 .
Apparently so :smile:
Works great. Thanks again. On Mar 5, 2016 1:07 PM, "Douglas Ludlow" notifications@github.com wrote:
Apparently so [image: :smile:]
— Reply to this email directly or view it on GitHub https://github.com/dougludlow/ng2-bs3-modal/issues/7#issuecomment-192699638 .
Apparently if you leave the tabindex="-1" off the div, the escape key wont close the modal automatically.
Any chance you could add an input for the modal to not close on escape which sets that tabindex?
Thanks!
Love the modal otherwise!