Note that there are some explanatory texts on larger screens.

plurals
  1. POKendo UI Mobile - TabStrip data-* going undefined after loading remote view w/ query string
    primarykey
    data
    text
    <p>I am using a pop over to select an item which will then have the application load a remote view with a particular query string. This works great, however, it appears to break some of the functionality within the tab strip I am using in my layout. First, the selected tab strip icon will no longer apply the active CSS properties (e.g. icon doesn't change color). Second, I receive the following error when I attempt to use the tab strip after the new remote view with (query string parameter) is displayed:</p> <pre><code>Uncaught TypeError: Cannot call method 'switchTo' of undefined general.mobile.functions.js:150 resetTabStripgeneral.mobile.functions.js:150 closeModalViewAndResetTabStripgeneral.mobile.functions.js:59 i.extend.triggerkendo.mobile.min.js:9 o.extend._releasekendo.mobile.min.js:14 arguments.length.t.(anonymous function)kendo.mobile.min.js:10 b.event.dispatchjquery.min.js:3 v.handle </code></pre> <p>Here is the line of code throwing the error inside of my function resetTabStrip:</p> <pre><code>$("[data-role=\"tabstrip\"]").data("kendoMobileTabStrip").switchTo("#test1"); </code></pre> <p>and here is how the tabstrip looks inside the DOM (which is initialized with JQuery in my initial page/view):</p> <pre><code>&lt;footer data-role="footer" class="m-footer km-footer" style="padding: 0; background-color: rgb(26, 46, 120);"&gt; &lt;div class="m-tabstrip km-tabstrip" data-role="tabstrip"&gt; &lt;a href="#test1" data-icon="favorites" data-rel="popover"&gt;Test1&lt;/a&gt; &lt;a href="#test2" data-icon="home"&gt;Test2&lt;/a&gt; &lt;a href="#test3" data-icon="action" data-rel="modalview"&gt;Test3&lt;/a&gt; &lt;/div&gt; &lt;/footer&gt; </code></pre> <p>Finally, when I try and output <code>$("[data-role=\"tabstrip\"]").data("kendoMobileTabStrip")</code> to the console of Google Chrome, I get undefined.</p> <p>I am using Kendo Q1 2013 release with JQuery 1.9.1.</p> <p><strong>Update:</strong></p> <p>This issue happens when using <code>data-reload="true"</code> on current view</p> <p><strong>Update 2:</strong></p> <p>In Google Chrome's console window, I am watching the tabstrip elements' <code>data()</code> as they are added into my SPA. When I arrive at my problem view (with <code>data-reload="true"</code>), the tabstrip works fine. As soon as I leave that view, the first tabstrip element's <code>data()</code> that was added into my SPA goes undefined, followed by the rest soon after.</p> <p>I would think that the most recent tabstrip element's <code>data()</code> would go undefined since that belongs to the view that uses <code>data-reload="true"</code>. I am starting to believe this may be a bug in the way Kendo destroys this view's tabstrip, as it should be destroying the most recent tabstrip, not the first one. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload