Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-1904] Android: StyledLabel: Click event fires twice, second without e.url

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2016-04-18T07:53:40.000+0000
Affected Version/sn/a
Fix Version/sBacklog
ComponentsStyledLabel
Labelsparity, styledlabel
ReporterFokke Zandbergen
AssigneeHans Knöchel
Created2013-08-21T08:11:01.000+0000
Updated2018-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();

Comments

  1. Daniel Sefton 2013-08-22

    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.
  2. Daniel Sefton 2013-08-22

    Note that the module is open source: https://github.com/appcelerator/titanium_modules/tree/master/styledlabel
  3. Fokke Zandbergen 2013-08-22

    I got the hint [~dsefton], but Android native is not my cup of tea ;)
  4. Eric Merriman 2018-08-06

    Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.

JSON Source