Results 1 to 7 of 7

Thread: [OPEN-200] HTML Hyperlinks Not Working on Android

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1

    Default [OPEN-200] HTML Hyperlinks Not Working on Android

    Sencha Touch version tested:

    • 0.9 rev 3


    • only default ext-all.css





    Platform tested against:

    • iOS (on friends iPhone, not sure which iOS version)
    • Android 2.1 (on HTC Desire)
    • Webkit Browsers (Midori and Chrome)



    Description:

    • Inserting hyperlinks into panels does not work as expected on Android.
    • Hyerlinks should be clickable to go to the link location in the web browser. This is working on iPhone and webkit browsers I've tried but does not work for Android 2.1 on my HTC Desire.



    Test Case:

    Code:
    Ext.setup({ 
        onReady: function () {
            window.panel = new Ext.Panel({
                fullscreen: true,
                html: 'Why not have a look at <a href="http://www.sencha.com">Sencha</a>.',
            });
        }
    });
    Steps to reproduce the problem:

    • Run the simple test case above.



    The result that was expected:

    • Hyperlink is clickable on iPhone and webkit browsers but not on Android 2.1.



    The result that occurs instead:

    • Clicking the link on Android 2.1 has no effect.
    • Behaviour should be the same as seen on iPhone and webkit browsers.



    Debugging already done:

    • none



    Possible fix:

    • not provided

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    Excellent report, thanks.

  3. #3

    Default

    I'm experiencing this issue as well on a HTC Evo running Android 2.2.

  4. #4

    Default

    Was having the same issue on a Nexus One device running Android 2.2, tracked it down to /core/TouchEventManager.js in the handler for startTrack

    Starting at line 90:
    Code:
            if (Ext.platform.isAndroidOS) {      
                if (!['input', 'select', 'textarea'].contains(target.tagName.toLowerCase())) {
                    e.preventDefault();
                    e.stopPropagation();                
                }
            }
    e.preventDefault(); seems to be blocking android from handling links, commenting it out allows them to work.
    In ext-touch-debug.js this would be line 2925.

  5. #5
    Sencha User
    Join Date
    Apr 2010
    Location
    Toronto
    Posts
    33

    Default

    This is an issue on HTC ledgend runnign Android 2.1

  6. #6
    Ext JS Premium Member
    Join Date
    Oct 2010
    Posts
    80

    Default

    @JCullen your fix is the only thing I've found that solves the Droid anchor problem so far. Does anyone know what this line was supposed to do?

  7. #7
    Sencha User
    Join Date
    Dec 2007
    Posts
    167

    Default

    I happened to meet this issue today on AndroidOS 2.2 of HTC Desire. I'm using latest Sencha Touch version 1.0. My scenario is that all the links not working when click/tap, and all the onclick inline events no respond.
    After long time tracing, I have to comment out these two lines in "src/core/Ext.js"
    Code:
        onTouchStartCapturing: function(e) {
            var target = e.target;
    
            if (!Ext.currentlyFocusedField && !Ext.is.Android) {
                this.scrollToTop();
            }
    
            if (Ext.is.Android) {
                if (target.nodeType == 3) {
                    target = target.parentNode;
                }
                
                if (target.tagName && (/input|select|textarea/i.test(target.tagName))) {
                    return;
                }
    
                //e.preventDefault();  // comment out here  
                //e.stopPropagation();
            }
        }

Similar Threads

  1. [FIXED-131] Android: Scrolling Issues
    By Christian El in forum Sencha Touch 1.x: Bugs
    Replies: 64
    Last Post: 9 Feb 2012, 6:38 AM
  2. Replies: 4
    Last Post: 24 Sep 2010, 5:41 AM
  3. Replies: 3
    Last Post: 8 Sep 2010, 4:13 PM
  4. HTML with inline JavaScript method is not working with panel.items.html
    By starsavari in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 2 Nov 2007, 7:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •