Marcelo
Posts: 0
Joined: Wed Mar 06, 2013 4:42 pm

Popup closes and opens again

I don't know why my popups, which were working ok before today, now are automatically reopening again after I close them. And It repeats this behavior many times - I close it, it reopens instantly. Please, advise.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Popup closes and opens again

Hi Marcelo,

Seems there are some problems with events. Please check on what event you call Action "Show Popup".

Marcelo
Posts: 0
Joined: Wed Mar 06, 2013 4:42 pm

Popup closes and opens again

Hi, Katya. I am using javascript:

Appery.navigateTo('dialogPopup', {
transition: 'none'
});

Today I changed from "Tiggzi.navigateTo" to "Appery.navigateTo" as an attempt to fix the issue, but it makes no difference.

Marcelo
Posts: 0
Joined: Wed Mar 06, 2013 4:42 pm

Popup closes and opens again

Additional info. When I hit the button on popup, I am using tap event and closePopup action to close the popup.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Popup closes and opens again

On what event do you call the code above?

Marcelo
Posts: 0
Joined: Wed Mar 06, 2013 4:42 pm

Popup closes and opens again

On click event of a button. Humm... should it be tap event? Could it be the reason? I am going to test the tap event right now.

Marcelo
Posts: 0
Joined: Wed Mar 06, 2013 4:42 pm

Popup closes and opens again

I think I understood what is happening. I noticed that as soon as the popup closes, the button that initially loaded the popup catches the same click/tap event that closed the popup, causing the popup to open again. If I carefully touch the button on the popup screen, the effect does not happen. Interesting... now I have to figure it out how to prevent the propagation.

Joop Verbaken
Posts: 0
Joined: Fri Mar 01, 2013 10:47 pm

Popup closes and opens again

Marcelo, we had the same problem. We expect that the '.on('click', '#button' , function() Appery.navigationTo('dialogPopup'. {transition: 'none'}); is defined multiple times.

To solve it we did:
Create a function that defines as a singleton function once the definition of the on_click call back functions and then invokes it once when this functions is created at 'on_load'

Let us know if this fix it for you too.

Marcelo
Posts: 0
Joined: Wed Mar 06, 2013 4:42 pm

Popup closes and opens again

Joop, thank you very much for sharing your solution.
We have fixed it some how (the guy that worked on it is travelling), but I believe it had something to do with your point.

Return to “Issues”