Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18209] iOS: Alert inside a window focus event listener pops up infinitely

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2014-12-16T01:38:34.000+0000
Affected Version/sRelease 3.5.0
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.5.0, regression
ReporterLokesh Choudhary
AssigneeVishal Duggal
Created2014-12-16T01:06:46.000+0000
Updated2017-03-20T22:20:57.000+0000

Description

This is a regression. The issue is not seen in 3.4.1.GA.

Description:

1. Copy and past the code below in the app.js of your app.
var win = Ti.UI.createWindow({
  backgroundColor: 'white'
});

win.addEventListener('focus',function(e){
	alert("focus event fired");
});

win.open();
2. Build & run on IOS device. 3. Launch the app. 4. After the app launches the window focus event is fired & we get an alert "focus event fired". 5. Close the alert by clicking on the OK button.

Actual Result:

1. You will see that the alert gets closed but immediately similar alert comes up with the same alert text. This happens infinitely. 2. One more thing to note is if we have a INFO log statement instead of an alert then the INFO log is seen only once which is the proper behavior.

Expected Result:

1. The alert should be seen only once when the window is opened & the focus event is fired.

Comments

  1. Ingo Muschenetz 2014-12-16

    [~emerriman] duplicate. Please reopen if you feel otherwise.
  2. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source