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

iOS: ImageView does not the trigger "load" event if touchEnabled is set to false

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 4.0.0
    • Component/s: iOS
    • Labels:
    • Environment:

      Ti SDK 3.1.x, ios 6.1

      Description

      An image won't trigger the load event if touchEnabled is set to false if the image property is set later (think custom caching or remote image)

      var win = Ti.UI.createWindow({
      	backgroundColor: '#fff'
      });
       
      win.open();
       
      var img = Ti.UI.createImageView({
      	// image: 'http://thinkmobile.appcelerator.com/Portals/164416/images/appc_stacked.png?' + new Date().valueOf(),
      	touchEnabled:false
      });
      win.add(img);
       
      img.addEventListener('load', function() {
      	alert('img loaded');
      });
       
       
      setTimeout(function(){
      	img.image = '/sample.jpg'
      	// img.image = 'http://thinkmobile.appcelerator.com/Portals/164416/images/appc_stacked.png?' + new Date().valueOf();
      },1000);
      

      It can be tested with both the attached image or the remote one.

      In case the remote image is set in the constructor and the image is cached by Titanium (so no Date() at the end) the second time the app is opened will trigger, but this only because the image is already cached in the device by Ti.

      The timeout simulates a custom caching where the images are grabbed on the device for offline usage.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                penrique Pedro Enrique (Inactive)
                Reporter:
                rborn Dan Tamas
                Reviewer:
                Vishal Duggal (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code