[AC-5810] Android: Click event not triggering for alert dialog for SDK 7+ when tapping outside the dialog
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2018-07-25T06:28:22.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | alertDialog, bug, titanium |
Reporter | Yahya Uddin |
Assignee | Shak Hossain |
Created | 2018-07-24T08:48:25.000+0000 |
Updated | 2018-07-25T06:37:27.000+0000 |
Description
For the following code:
*index.xml*
<Alloy>
<Window id="win" backgroundColor="white" layout="vertical">
<Button top="32" left="32" right="32" onClick="onClickButton">
Click Me!
</Button>
</Window>
</Alloy>
*index.js*
$.win.open();
function onClickButton() {
var dialog = Ti.UI.createAlertDialog({
title: "Hello World!",
message: "hi",
// buttonNames: ['OK']
ok: "OK"
});
dialog.addEventListener("click", function () {
alert("You clicked!");
});
dialog.show();
}
On 6.3.0.GA, the alert dialog with the message "You clicked!" would correctly appear if you:
1. Click the background surrounding the dialog
2. Press the back hardware button
3. Click the "OK" button (provided you of course you have a button with the dialog)
However, for 7.2.0.GA, (1) and (2) does not work.
However (3) does work (i.e. when clicking the "OK" button)
I have not tested this on iOS with the new SDK version.
Hello [~yahya12], We have tested the issue. We aren't able to reproduce it. We have tested on SDK 7.2.0.GA in both Android and iOS. Can you provide the full code that you are trying? Thanks.
[~yahya12] Instead of using the
ok
property, does it work with usingbuttonNames: ['OK']
instead? We should still validate this.Thanks for the ticket updates [~yahya12]. This specific one has been fixes as part of TIMOB-25977 for 7.3.0.
Same applies with buttonNames as well.
Good to know it's been fixed. When is 7.3.0 planning to be released aprox?
Next week. You can use it already by installing it via
appc ti sdk install -b 7_3_X
.Is that the release candidate or general release?
It's the pre-RC version. RC is planned for this week, GA next week.
Cheers. Thanks a lot!