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

Problem with missing route

3 Answers 45 Views
SPA
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 25 Mar 2014, 01:59 PM
I believe I have found a bug in the router control, with the routeMissing callback.  According to the documentation, you should be able to call e.preventDefault() to cancel the navigation and stay on the current route.

This works as expected if I have a link on a page that points to an invalid route (ex. "#/missing") - the route is cancelled and I stay on the current view.  But if I type the missing route (#/missing) into the browser address bar, then it reverts back to the route prior to the current route.

I have created an example in JS Bin that demonstrates this behavior - http://jsbin.com/EXARiTiJ/26

Here are the steps to recreate the issue:
  1. When the page loads, it will first navigate to the Home view
  2. Click on "Orders" to navigate to the Orders view.  This will navigate correctly and update the url appropriately.
  3. Click "Missing" to navigate to a route that has not been defined.  This will fire the routeMissing handler, which calls e.preventDefault() and reverts the url and the view back to "Orders"
  4. However, if you manually update the url in the address bar to "#/missing", the routeMissing handler fires and you are sent back to the Home view, and the url still has the invalid route (#/missing)

I am using the Q1 2014 release of the controls and testing in IE 10.  I do not see the issue when testing with Google Chrome (v. 33)

3 Answers, 1 is accepted

Sort by
0
Accepted
Petyo
Telerik team
answered on 27 Mar 2014, 08:48 AM
Hi Sean,

thank you very much for bringing this to our attention and about the detailed bug report. I am filing this as a bug report in our system - we will try address it in one of our upcoming internal build releases. Your telerik points have been updated for your help.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Sean
Top achievements
Rank 1
answered on 17 Apr 2014, 06:42 PM
I have validated that this issue is fixed in the Q1 2014 SP1 release.
0
Petyo
Telerik team
answered on 18 Apr 2014, 08:44 AM
Hi Sean,

Thank you very much for the update - the problem was quite hard to reproduce. I am glad that everything is working as expected on your side. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
SPA
Asked by
Sean
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Sean
Top achievements
Rank 1
Share this question
or