-
-
Notifications
You must be signed in to change notification settings - Fork 78.5k
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
Fix reopening modal when modal already active #21687
Comments
I think this is a duplicate of #21607 which has a fix coming. |
Instead of setting a timeout you should listen for the event Something like that: $('#firstModal').one('hidden.bs.modal', function () {
$('#secondModal').modal('show');
}); |
@vanduynslagerp Yea, but in my case code will big and dirty: let editSelection = function(e) {
const open = function() {
$modal.modal({
keyboard: false,
backdrop: 'static'
});
};
$modal.one('hidden.bs.modal', open);
swal('Attention!', 'Save before open new modal?', 'warning').then(() => {
$.post('/save', function() {
$modal.modal('hide');
}).catch(function() {
$modal.off('hidden.bs.modal', open);
});
}, () => $modal.modal('hide'));
} |
It doesn't seem particularly big or ugly. I'm not exactly sure what you are trying to achieve here, but I gather that it would be something like that:
Maybe, after the post, instead of closing modal 1 and opening Modal2, you could stay in Modal 1 and change it's content ? Like that:
|
Its good, but i need return previous content of modal 1 and probably in future i need to 3'th modal... |
Close due to the merge of #21743 , fix will be available at our next release |
I need open new modal from current modal by click button inside current modal.
Now i can do this only with crutch:
Otherwise i have error
Uncaught Error: Modal is transitioning
Example here https://jsfiddle.net/rorc/nke1dvpz/
The text was updated successfully, but these errors were encountered: