Native alert wont lose focus

Hi I am having a problem with native.alert. the alert works fine on simulator, action on OK button, cancelled with cancel button. But on the ios device itself the button is fine with cancel but if I choose OK the action is carried out but the whole stage then receives the alert action which is recalled every time any part of the screen is touched.

function onComplete(event)

     if “clicked”==event.action then

          if 1 = event.index then

                actions on OK

          elseif event.index == 2 then

                actions on cancel

          end

     end

end  

A bit more info.

On the device the alert takes place but on completion the button which triggered the native.alert in its listener stays in the “began” phase. In the simulator it moves to “ended”.

Any ideas? in the calling function (the listener for my button)  the alert is called in an if statement

sorry, pressed enter to soon in that forum dialog.

the code is

if ( “began” == phase) then

       local alert = native.showAlert(“clear memory”, “Are you sure?”, {“OK”, “Cancel”}, onComplete)

end

a bit more info, after the alert has been called it takes over the whole screen, any touch on the screen reactivates the alert.

I moved the alert code from event.phase = “began” to event.phase = “ended” and Robert was my fathers’s brother.

A bit more info.

On the device the alert takes place but on completion the button which triggered the native.alert in its listener stays in the “began” phase. In the simulator it moves to “ended”.

Any ideas? in the calling function (the listener for my button)  the alert is called in an if statement

sorry, pressed enter to soon in that forum dialog.

the code is

if ( “began” == phase) then

       local alert = native.showAlert(“clear memory”, “Are you sure?”, {“OK”, “Cancel”}, onComplete)

end

a bit more info, after the alert has been called it takes over the whole screen, any touch on the screen reactivates the alert.

I moved the alert code from event.phase = “began” to event.phase = “ended” and Robert was my fathers’s brother.