Skip to content
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

onshow/onshown never being triggered #370

Open
amjo opened this issue Feb 16, 2018 · 4 comments
Open

onshow/onshown never being triggered #370

amjo opened this issue Feb 16, 2018 · 4 comments

Comments

@amjo
Copy link

amjo commented Feb 16, 2018

I've got to show a bootstrap dialog in order to disaply an upload form.

problem is, i can never get the onshow or onshown events trigger.

I'm kind of running out of options to why this is happening. the dialog opens up normally, but placing an alert("I'm not that Awesome"); doesn't work.

here's a snippet of my code:

var uploadDialog = new BootstrapDialog({
	size: BootstrapDialog.SIZE_WIDE,
	title: 'Upload Visas',
	closable: false,
	message: function(dialogRef) {
		// some message
	},
	onshown: function(dialogRef){
		alert("here"); /// nope, not working.
	},
	buttons: [{
		label: 'Done Uploading',
		// no title as it is optional
		cssClass: 'btn-success',
		action: function(dialogItself){
			dialogItself.close();
		}
	},{
	label: 'Close',
		action: function(dialogItself){
			dialogItself.close();
		}
	}]

});
uploadDialog.open();
@erikbartlow
Copy link

I've been looking at the code, and I'm not seeing any real trigger of the events, onshow/onshown. I only see on the open function the call to 'show'.
The open method looks to call the 'show' function, but in the show I don't see any reference to the shown function.

Around Line 1090

open: function () {
     !this.isRealized() && this.realize();
     this.getModal().modal('show');
     return this;
}

@nakupanda
Copy link
Owner

@amjo @erikbartlow what's the version of bootstrap and bootstrap-dialog?

@TriLogic
Copy link

I'm using BootstrapDialog here in Jan of 2020 and I'm seeing this same behavior. I'd like to focus a text field in the dialog content when the dialog pops but it isn't working.

@shanerutter
Copy link

Still an issue 2022 for me.

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

No branches or pull requests

5 participants