Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-18048

Android: Ti.UI.Label.html - setting html property makes it non-clickable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 3.4.0, Release 3.4.1
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Appcelerator Studio & Titanium 3.4.1.GA
      Alloy 1.5.1
      Android 2.3

      Device: Xperia Play
      Android Version 4.0.4
      Mobile SDK 3.4.1.GA SDK.

    • Story Points:
      5
    • Sprint:
      2014 Sprint 25 SDK, 2015 Sprint 06 SDK

      Description

      Problem Description

      Once you set the html property in a label, the click event is lost.

      Test Case

      1. Create a new mobile project Classic titanium
      2. Paste this code into app.js:

      app.js

      var win = Ti.UI.createWindow({
        backgroundColor: "#fff"
      });
      var lbl = Ti.UI.createLabel({
       backgroundColor: "red",
       html: "Click <b>here</b>    <a href=\"http://www.w3schools.com\">Visit W3Schools.com!</a>"
      });
      lbl.addEventListener("click", function(){
        alert("clicked");
      });
      win.add(lbl);
      win.open();
      

      3. Run it in a 4.0.x device.
      4. Click the label

      Expected results

      After clicking the label, an alert should appear.

      Actual results

      alert is not shown.

        Attachments

          Activity

            People

            • Assignee:
              msamah Ashraf Abu (Inactive)
              Reporter:
              mano.mykingdom Manoj Kumar
              Reviewer:
              Hieu Pham
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-19381
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code