[AC-5030] Dialog box click not triggered
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2017-06-16T18:34:38.000+0000 |
Affected Version/s | Appcelerator Studio 4.5.0 |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Guile |
Assignee | Shak Hossain |
Created | 2017-06-15T16:06:00.000+0000 |
Updated | 2017-06-16T18:34:38.000+0000 |
Description
The following code show a problem between alert dialog and controller.
I create an empty project, create an empty controller called 'test', then put this code in index.js
When you click on the label, its text is changed to "dialog open"
When you answer to the dialog, the label text is set to "dialog closed"
Because of the Alloy.createController() line , the click event is not triggered even if the dialog is closed. This happened very randomly (not at every time, I have to test it many time, by waiting few second before answer to the dialog).
I noticed this behaviour very rarely (but it may occur) without the createController, and it happens more often when I put createController()
use case : I use the widget fokkezb.loading that create a controller, and sometimes I need to open a dialog alert.
function doClick(e) {
Alloy.createController('test');
var a = Titanium.UI.createAlertDialog({
title : 'b',
message : 'a',
buttonNames : ['Y', 'N'],
cancel : 1
});
a.addEventListener('click', function() {
$.label.text = 'dialog closed';
});
$.label.text = 'dialog open';
a.show();
}
$.index.open();
Seems this is due to the property
This issue is related with TIMOB-24349 ...
Thanks! So it does **not** work with
run-on-main-thread
set totrue
? I would like to close it asDuplicate
then and put the related ticket on our list asap.