Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5810] Android: Click event not triggering for alert dialog for SDK 7+ when tapping outside the dialog

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionDuplicate
Resolution Date2018-07-25T06:28:22.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsalertDialog, bug, titanium
ReporterYahya Uddin
AssigneeShak Hossain
Created2018-07-24T08:48:25.000+0000
Updated2018-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.

Comments

  1. Sharif AbuDarda 2018-07-24

    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.
  2. Hans Knöchel 2018-07-25

    [~yahya12] Instead of using the ok property, does it work with using buttonNames: ['OK'] instead? We should still validate this.
  3. Hans Knöchel 2018-07-25

    Thanks for the ticket updates [~yahya12]. This specific one has been fixes as part of TIMOB-25977 for 7.3.0.
  4. Yahya Uddin 2018-07-25

    Same applies with buttonNames as well.
  5. Yahya Uddin 2018-07-25

    Good to know it's been fixed. When is 7.3.0 planning to be released aprox?
  6. Hans Knöchel 2018-07-25

    Next week. You can use it already by installing it via appc ti sdk install -b 7_3_X.
  7. Yahya Uddin 2018-07-25

    Is that the release candidate or general release?
  8. Hans Knöchel 2018-07-25

    It's the pre-RC version. RC is planned for this week, GA next week.
  9. Yahya Uddin 2018-07-25

    Cheers. Thanks a lot!

JSON Source