Search code examples
kendo-uikendo-tabstrip

How to disable keyboard navigation in a Kendo UI TabStrip?


According to the documentation, I should be able to turn off keyboard navigation in a Kendo UI TabStrip widget by including "navigatable: false" in the widget configuration. However, I can't get this to work. I've made a boiled down (see below) that contains the bare minimum to exemplify my dilemma. Am I missing something or does this look like a bug in the library?

Below is a code snippet example. To give keyboard focus to the tab strip, just click anywhere in it. Then the arrow keys when pressed will navigate the tab strip when I expect keyboard navigation to be disabled.

$(document).ready(function() {
  $("#tabstrip").kendoTabStrip({
    navigatable : false
  });
});
<link href="http://da7xgjtj801h2.cloudfront.net/2014.1.318/styles/kendo.common.min.css" rel="stylesheet"/>
<link href="http://da7xgjtj801h2.cloudfront.net/2014.1.318/styles/kendo.rtl.min.css" rel="stylesheet"/>
<link href="http://da7xgjtj801h2.cloudfront.net/2014.1.318/styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
<link href="http://da7xgjtj801h2.cloudfront.net/2014.1.318/styles/kendo.dataviz.min.css" rel="stylesheet" type="text/css" />
<link href="http://da7xgjtj801h2.cloudfront.net/2014.1.318/styles/kendo.dataviz.default.min.css" rel="stylesheet" type="text/css" />
<link href="http://da7xgjtj801h2.cloudfront.net/2014.1.318/styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://da7xgjtj801h2.cloudfront.net/2014.1.318/js/kendo.all.min.js"></script>
<div id="tabstrip">
  <ul>
    <li class="k-state-active">Tab A</li>
    <li>Tab B</li>
  </ul>
  <div>
    <div>Content for Tab A</div>
  </div>
  <div>
    <div>Content for Tab B</div>
  </div>
</div>


Solution

  • This navigatable option was introduced for the first time on Q2 2014 Beta on June 25, 2014. I think that the release that you are using does not include it. Try using a newer one a 2014.2.716

    $(document).ready(function() {
      $("#tabstrip").kendoTabStrip({
        navigatable : false
      });
    });
    <link href="http://da7xgjtj801h2.cloudfront.net/2014.2.716/styles/kendo.common.min.css" rel="stylesheet"/>
    <link href="http://da7xgjtj801h2.cloudfront.net/2014.2.716/styles/kendo.rtl.min.css" rel="stylesheet"/>
    <link href="http://da7xgjtj801h2.cloudfront.net/2014.2.716/styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
    <link href="http://da7xgjtj801h2.cloudfront.net/2014.2.716/styles/kendo.dataviz.min.css" rel="stylesheet" type="text/css" />
    <link href="http://da7xgjtj801h2.cloudfront.net/2014.2.716/styles/kendo.dataviz.default.min.css" rel="stylesheet" type="text/css" />
    <link href="http://da7xgjtj801h2.cloudfront.net/2014.2.716/styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
    <script src="http://da7xgjtj801h2.cloudfront.net/2014.2.716/js/jquery.min.js"></script>
    <script src="http://da7xgjtj801h2.cloudfront.net/2014.2.716/js/kendo.all.min.js"></script>
    <div id="tabstrip">
      <ul>
        <li class="k-state-active">Tab A</li>
        <li>Tab B</li>
      </ul>
      <div>
        <div>Content for Tab A</div>
      </div>
      <div>
        <div>Content for Tab B</div>
      </div>
    </div>