• Resolved Steven Jay Cohen

    (@stevenjaycohen)


    Hi Scott,

    Using a stock standard Decode v2.8.4, and viewing on a Kindle Fire (original edition), the sidebar is always open. It does not respond to the close X.

    I know that the Amazon Silk browser is based upon Webkit, but I have not been able to reproduce the problem with any other webkit browser.

    Unfortunately, I do get a fair amount of traffic on Kindles, so this is an issue for my site.

    Any suggestions?

    (If it were stuck closed, it would be less of an issue for me, though that wouldn’t actually solve the problem.)

    Steven

Viewing 15 replies - 1 through 15 (of 24 total)
  • Thread Starter Steven Jay Cohen

    (@stevenjaycohen)

    Thread Starter Steven Jay Cohen

    (@stevenjaycohen)

    I read back through the support forum for any similar reports.

    Just tried turning off Quick Cache, no effect.

    Probably a stupid effort by me to help, but found this link, https://www.dummies.com/how-to/content/the-kindle-fire-hd-options-bar.html

    Thread Starter Steven Jay Cohen

    (@stevenjaycohen)

    No, I mean that Decode’s Sidebar (where the widgets live) is always shown and will not close if you click on the X.

    So Kindle Fire is based on Android 2.3.x which tests positive for transform support (and thus doesn’t use the fallback I designed). Unfortunately, it is so extremely buggy that it doesn’t work at all.

    Right now, a possible solution is in the works, but as 2.3 decreases in marketshare, this issue continues to get less attention.
    Modernizr could change the test (best solution, in my opinion)

    Thread Starter Steven Jay Cohen

    (@stevenjaycohen)

    If I wanted to use the JS based detection that I mentioned above, what id/class would I want to set to display:none ?

    A lot of people in publishing visit my site. And, a fair number of them use Kindles for casual browsing.

    You could make the whole sidebar go away with
    .sidebar { display: none; }

    But ideally, you could add the body class “.no-csstransforms”. That would initiate the fallback.

    Thread Starter Steven Jay Cohen

    (@stevenjaycohen)

    In my functions.php

    function sjc_scripts() {
    	wp_enqueue_script( 'kindle-hack', get_stylesheet_directory_uri() . '/kindle.js', array(), '1.0.0', true );
    	}
    
    	add_action( 'wp_enqueue_scripts', 'sjc_scripts' );

    In kindle.js

    var ua = navigator.userAgent;
    var isKindle = /Kindle/i.test(ua) || /Silk/i.test(ua) || /KFTT/i.test(ua) || /KFOT/i.test(ua) || /KFJWA/i.test(ua) || /KFJWI/i.test(ua) || /KFSOWI/i.test(ua) || /KFTHWA/i.test(ua) || /KFTHWI/i.test(ua) || /KFAPWA/i.test(ua) || /KFAPWI/i.test(ua);
    if(isKindle) {
    	jQuery('body').addClass('no-csstransforms');
    }

    If you can adapt this to fix the problem in all of Android 2.3, let me know ??

    Thread Starter Steven Jay Cohen

    (@stevenjaycohen)

    Forgot to mark it resolved ??

    var ua = navigator.userAgent;
    if( ua.indexOf("Android") >= 0 ) {
      var androidversion = parseFloat(ua.slice(ua.indexOf("Android")+8));
      if (androidversion < 2.3) {
          jQuery('body').addClass('no-csstransforms');
    } }

    Let me know if that works.

    Thread Starter Steven Jay Cohen

    (@stevenjaycohen)

    No, because for whatever reason, the Kindle Fire identifies itself as an Intel Mac running 10.6.3 and not Linux ??

    So, I combined your code with mine using ||.

    That should cover both old Android devices and Kindles.

    var ua = navigator.userAgent;
    var isKindle = /Kindle/i.test(ua) || /Silk/i.test(ua) || /KFTT/i.test(ua) || /KFOT/i.test(ua) || /KFJWA/i.test(ua) || /KFJWI/i.test(ua) || /KFSOWI/i.test(ua) || /KFTHWA/i.test(ua) || /KFTHWI/i.test(ua) || /KFAPWA/i.test(ua) || /KFAPWI/i.test(ua);
    if(isKindle) {
    	jQuery('body').addClass('no-csstransforms');
    }
    if( ua.indexOf("Android") >= 0 ) {
    	var androidversion = parseFloat(ua.slice(ua.indexOf("Android")+8));
    	if (androidversion < 2.3 || isKindle) {
          jQuery('body').addClass('no-csstransforms');
    	}
    }

    Of course it would! See this is why I have a rule of not getting involved in user agent sniffing. It’s extremely annoying when a test gives a false positive.

    I know this is down as resolved, but I’m actually getting the same behaviour on Chrome, both desktop and mobile – sidebar is always open, and won’t close on click, even though the behaviour is as expected on Firefox and IE11. You can check it at say-write.com

    Helsinki, have you edited any of the Decode theme files? I see it on your site, but Decode works out of the box, so something must be different on your site.

    I’m running a child theme, but I haven’t actually customised anything. I’m using the CSS Plus plugin to add CSS changes directly into individual posts. Anyhow, I just disabled ALL my plugins and it’s still not working properly. I have this in custom CSS:

    .sidebar { overflow-y: auto; }
    blockquote {
    margin: 1.5% 0;
    padding: 0 0 0 5%;
    border: none;
    }
    .sidebar {
    width: 20%;
    }

    And that’s it, that’s the sum total of the customisation. I’ll try to switch back to the full theme and see what gives.

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Sidebar ALWAYS OPEN on Kindle Fire’ is closed to new replies.