[MOD-1904] Android: StyledLabel: Click event fires twice, second without e.url
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-04-18T07:53:40.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Backlog |
| Components | StyledLabel |
| Labels | parity, styledlabel |
| Reporter | Fokke Zandbergen |
| Assignee | Hans Knöchel |
| Created | 2013-08-21T08:11:01.000+0000 |
| Updated | 2018-08-06T17:49:22.000+0000 |
Description
Given the following code, the click-event fires twice. The second one showing
e.url as undefined:
var StyledLabel = require('ti.styledlabel');
var w = Ti.UI.createWindow({
backgroundColor : 'white'
});
var l = StyledLabel.createLabel({
html : '<a href="http://appcelerator.com">Appcelerator</a>'
});
l.addEventListener('click', function(e) {
Ti.API.info('URL ' + e.url);
});
w.add(l);
w.open();
Tested and confirmed with ti.styledlabel 2.0 with Ti SDK 3.1.2 GA and 3.2 CI on Samsung Galaxy S2 Android 2.3.6. Works in iOS 6 simulator.
Note that the module is open source: https://github.com/appcelerator/titanium_modules/tree/master/styledlabel
I got the hint [~dsefton], but Android native is not my cup of tea ;)
Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.