If a Kendo View is rendered into a Layout (using layout.showIn()), the show event for the view fires twice. Interestingly, if the view is rendered directly into a DOM element (using view.render()) the event is only fired once, like it's supposed to.
The code is pretty well copied from the Kendo UI Dojo thingee. I wonder if can you run this : https://dojo.telerik.com/AkOwiMAZ/2
<div id="app"></div>
<script>
var foo = new kendo.View("<span>Foo</span>", { hide: function() { console.log("Foo is hidden now"); }, show: function() { console.log( "Foo is shown now"); }});
var layout = new kendo.Layout("<header>Header</header><section id='content'></section><footer></footer>");
// Creating the layout, and using the showIn method to render the view
// is where I'm having the issue (2 'show' events fire)
layout.render($("#app"));
layout.showIn("#content", foo);
//
// But this way works fine (rendering directly to a DOM element) (just // one 'show' event fires)
//foo.render('#app');
</script>
I would like the 'show' event to fire once, as it is only shown once :)