Modal automatically closes by itself in tabview


#1

Hi,

I have a problem, I recently upgrade my app to beta 11 i have a tabs view (4 tabs) in the first one there is button it opens a modal but the modal closes automatically after a short time.
before upgrade it was working fine.

Any help will be appreaciated


#2

Can you provide some code we can take a look at? Any error message?


#3

i have a huge logic and there is No error displayed, but when a removed the function ionViewDidEnter it’s work fine i don’t know if there is a relation between them


#4

Good thing it works now! Hope fully at a later time you can incorporate that functionality back into your app.
Edit: Your issue might exist, its just hard to know what it is without seeing anything. Maybe someone else on here knows an issue with it. Here is an issue created a week ago about modals and lifecycle events in ionic


#5

but i need the function ionViewDidEnter to launch a loader:

export class tabxPage {

constructor() {
}
ionViewDidEnter(){
this.loader = this.loadingCtrl.create({content: ‘waitmsg’});
setTimeout(()=> {
this.loader.present(this.loader).then(()=>{
same http call })
},0);

}
showSearchOption(){
let myModal = this.modalCtrl.create(MyModal);
myModal.onDidDismiss(data => { console.log(data); });
myModal.present();
}


#6

Any solution for this problem??


#7

let modalNotesTechnical = this.modalCtrl.create(NotesTechnicalModalPage,{},{
showBackdrop: false,
enableBackdropDismiss: false
});
modalNotesTechnical.present();

I have a similar problem and present the modal in this way solved it!!