Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

Knockout in iFrame #26

Open
Stewartarmbrecht opened this issue Jun 21, 2013 · 3 comments
Open

Knockout in iFrame #26

Stewartarmbrecht opened this issue Jun 21, 2013 · 3 comments

Comments

@Stewartarmbrecht
Copy link

I am not sure if this is UITest related but maybe someone here can help. I am using UITest.js to test a knockout application.
In the application I have a text box. The text input's value is bound to a knockout observable: . When I try to update the value in the UITest window with jquery the knockout binding does not update:
$('#uitestwindow').contents().find('#menuOptionName').val('Test') // $root.selectedName not updated.
However, if I do the same thing when the application is loaded in its own window it works:
$('#menuOptionName').val('Test').change() // $root.selectedName IS updated.
Could there be something in the UITest setup that breaks this?

@Stewartarmbrecht
Copy link
Author

BTW - The actual value of the text box is updated and the change event is fired. It's just the knockout binding that doesn't seem to notice it. Also, if I manually update the text box field the binding fires.

@Stewartarmbrecht
Copy link
Author

I figured out that there is nothing related to UITest that is causing this issue. Here is a sample of the problem: https://groups.google.com/d/msg/knockoutjs/av0sikLJhxg/PXCrk_hce7EJ The problem is that the third text box is updated by javascript from the parent window and the knockout binding that should cause the save button to show is not firing.

@tbosch
Copy link
Contributor

tbosch commented Jun 28, 2013

Hi,
will look into this next week. Thanks for reporting!

Tobias

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants