This is a migrated thread and some comments may be shown as answers.

Error with backbutton on first page

4 Answers 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 28 May 2013, 04:26 AM
Using a simple page with a back button causes the following error when button is touched:

05-27 23:11:34.639: E/Web Console(26316): Uncaught TypeError: Cannot call method 'split' of undefined at file:///android_asset/www/js/kendo.mobile.min.js:13

Downloaded Kendo complete about May 20th, 2013.
Here is the entire page:

<!DOCTYPE html>
<html>
<head>
<title>Kendo UI Mobile</title>
<link href="css/kendo.mobile.all.min.css" rel="stylesheet"
type="text/css" />
<script src="js/jquery.min.js"></script>
<script src="js/kendo.mobile.min.js"></script>
</head>
<body>
<div data-role="view" data-title="View" id="index">
Some text just to fill some space<br>
<br> <a data-role="backbutton">Foo</a>
</div>
<script>
var app = new kendo.mobile.Application();
</script>
</body>
</html>

Is this a bug or what?

Thanks,
Kevin

4 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 29 May 2013, 02:18 PM
Hello Kevin,

I am not sure that I understand this case completely. What would be the expected outcome when a back button is pressed on the first page?

Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Kevin
Top achievements
Rank 1
answered on 29 May 2013, 03:58 PM
Thanks Petyo for getting back to me.

This simplified demo  was meant to figure out what my options are for managing user use of back buttons. Within Phonegap/Cordova I can call the navigate("#:back") method IF I choose to catch the back button event or alternatively have a generic back button on a header, especially in iOS. My first view can vary depending on information stored locally on the device and there MAY be multiple ways to get there again without using back-navigation. My intentions will depend on what does and doesn't work. Please let me know if this option is broken or I'm not using it correctly. I'm just trying to figure out what options I do and don't have so I can program accordingly.

Since you asked, my expectations of a back navigation on a first page are:
1) not raise an error.
2) preferably leave the browser if there are no more views to go back to

I guess I can ask my original question in a different way: What expectations should I have when a back navigation is triggered on a first page? And do I need to keep my own history parallel to Kendo Mobile's so as to prevent this Kendo code error? 

Thanks,
Kevin
0
Accepted
Alexander Valchev
Telerik team
answered on 31 May 2013, 01:25 PM
Hello Kevin,

We have a very similar situation in our online demos. The best option from UI perspective in my opinion would be to hide the button, instead of having a non-functional one. 

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Kevin
Top achievements
Rank 1
answered on 31 May 2013, 08:15 PM
Thanks. That helps a lot by letting me know that it wasn't something I was missing or setting up wrong. Like I mentioned, I'm just figuring out my options so I can design the UI flow with what I got.
Tags
General Discussions
Asked by
Kevin
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Kevin
Top achievements
Rank 1
Alexander Valchev
Telerik team
Share this question
or