Remote view causes unpredictable form/DOM behavior.

2 posts, 0 answers
  1. Alex Smith
    Alex Smith avatar
    17 posts
    Member since:
    Dec 2009

    Posted 24 Oct 2013 Link to this post

    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.

  2. Petyo
    Petyo avatar
    2444 posts

    Posted 28 Oct 2013 Link to this post

    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. 

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top