double native.showAlert call makes Corona Simulator window backmost on click.

After I called native.showAlert from native.showAlert’s listener, the Corona Simulator window always be backmosted each time I click the window.

Is this a bug on Corona Simulator? or should I call 2nd native.showAlert as timer.performDelay(1, function() native.showAlert() end)?

I’m using Corona SDK 2013.1076 on Mac OS 10.8.3 and here is a sample code.

local function testAlert() native.showAlert("showAlert", "test 1", {"OK"}, function(event) if "clicked" == event.action then native.showAlert("showAlert", "test 2", {"OK"}) end end) end local button = display.newRect(100, 200, 80, 40) button:addEventListener("touch", function(event) if event.phase == "ended" then testAlert() end return true end)

Can you put together a small sample project that shows this problem and file a bug report using the “Report a bug” link above?

Hi Rob. I sent a bug report. Thank you.

I got a reply from Corona Labs support. It said this is a bug but fixing is low priority because there is a workaround.

Suggested workaround is the same as I wrote above.

timer.performWithDelay( 1, function()native.showAlert("showAlert", "test 2", {"OK"} ) end )  

I had the same problem. Great there is a work around. I’ll test it tomorrow.

Can you put together a small sample project that shows this problem and file a bug report using the “Report a bug” link above?

Hi Rob. I sent a bug report. Thank you.

I got a reply from Corona Labs support. It said this is a bug but fixing is low priority because there is a workaround.

Suggested workaround is the same as I wrote above.

timer.performWithDelay( 1, function()native.showAlert("showAlert", "test 2", {"OK"} ) end )  

I had the same problem. Great there is a work around. I’ll test it tomorrow.