Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1721] Window 'open' & 'close' events do not fire when touchEnabled == false

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNot Our Bug
Resolution Date2014-06-26T16:30:38.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labels3.3.0.RC, close, event, open, sdk, titanium, window
ReporterGertjan Smits
AssigneeShuo Liang
Created2014-06-26T10:59:15.000+0000
Updated2016-03-08T07:38:13.000+0000

Description

The open & close events are not fired when touchEnabled is set to false, when the property is removed, it fires.
var w = Ti.UI.createWindow({
	touchEnabled:false,
	backgroundColor:'red'
});
w.addEventListener('open', function( ) {
	alert('open');
});

w.addEventListener('close', function( ) {
	alert('close');
});

w.open();

setTimeout(function( ) {
	w.close();
}, 2500);

Comments

  1. Shuo Liang 2014-06-26

    Hi, when you set touchEnabled: false, w will not register event any more, (include "open", "close", not just 'click' event). *All* the events will be gone. Here is a good explain may help you: http://developer.appcelerator.com/question/154004/what-is-touchenabled Regards Shuo
  2. Gertjan Smits 2014-06-26

    Ok, that explains the behavior, but I assumed that only *touch* events are ignored, which I think should be the case here. An event like open or close has nothing to do with a touch to the view.
  3. Gertjan Smits 2014-06-27

    So there is no way to know if a window with touchEnabled set to false has been opened and closed?
  4. Gertjan Smits 2014-12-15

    I'm also not allowed to know when a WebView is loaded when it's touchEnabled property is false? :( This issue really can not be closed...

JSON Source