Kendo UI Mobile - "data-click" attribute is ignored on anchor tag in listview
I have a situation like this:
<ul data-role="listview">
<li>
<a data-click="resolveAddressPrefix" href="<address-suffix>" data-rel="external">
<span>Here is some stuff inside my anchor tag</span>
</a>
</li>
</ul>
Kendo data attributes - * are ignored. If I change data-click
to onclick
, the function does, but that is not a solution.
I tried adding data-role="button"
to my anchor tag but didn't do anything.
Any help would be greatly appreciated. I am using the latest service pack for Kendo UI Mobile and JQuery.
PS: I would really like to solve this problem without initialization via javascript or whatever.
source to share
Further research finally led me to a forum post on the Kendo Mobile forums that I hadn't seen. This is mainly a bug and fixed in the latest internal build. However, as a workaround for my situation, I have applied the attribute data-click="resolveAddressPrefix"
to the tag for now <ul>
. Then, in my function, resolveAddressPrefix
I added event.preventDefault()
. Finally, since this error is also related data-rel="external"
, I used javascript to manually execute the "external" link, window.location.href = ...
Hopefully this helps someone who doesn't have access to internal assemblies.
source to share