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

Remote view causes unpredictable form/DOM behavior.

1 Answer 24 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alex Smith
Top achievements
Rank 1
Alex Smith asked on 24 Oct 2013, 07:44 PM
I have attached a simple test app to replicate this behavior.
There are 2 pages, the main index.html page, and a remote list.html page.
On the index page there is a textbox into which you can enter any input. When you click the login button the value of that input is read and echoed to the console, as well as appended to the URL for the remote view.

So if you enter 'bilbo' the URL for the remote view will be ".../list.html?val=bilbo'".

If you hit the cancel button on the list page you go back to the index page. Now the interesting part. If you enter another value in the text box and click login, it will always read 'bilbo' from the text box.

What I have noticed:
if the cancel button on the list page invokes app.navigate("#:back") or you use the back button everything works.
if you invoke app.navigate("index.html") or app.navigate("vIndex") then we get the same 'locked in' behavior.

Now, in this example it's great that the "#:back" function works. But in my actual app I have multiple remote views and I can't transition between them to capture new input. Once the value is set the first time it's locked in.

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 28 Oct 2013, 03:23 PM
Hi Alex,

The behavior you observe is particular to the root view. The root view is not a remote view - navigating to index.html actually does a duplicate request for that URL, looking for remote view. Please try navigating to it using app.navigate("/"). 

This behavior should not occur with views other than the root view. However, you can check this by using the browser inspector and observing the network requests and the DOM for duplicate view elements. 

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