Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

For any element I see only the $root bindings #21

Open
DougLeary opened this issue Sep 12, 2014 · 4 comments
Open

For any element I see only the $root bindings #21

DougLeary opened this issue Sep 12, 2014 · 4 comments

Comments

@DougLeary
Copy link

No matter which element I inspect, the knockout tab always shows the same list of observables from $root for the page. When the page loads dynamic content the tab stays the same. It always says the $parents array is empty, even when I inspect an element that is nested several context layers deep.

@timstuyckens
Copy link
Owner

Hi,

Do you have the issue on every website with knockoutjs ? If not, could you specify a website/screenshot so I can see the issue. Picture is thousand words :)
Could you please try it on the following website: http://knockoutjs.com/examples/contactsEditor.html

This should give something like below

image

What is the current version of the installed extension?
Should be 2.6.3
image

@DougLeary
Copy link
Author

Hi Tim,

Thanks very much for replying. On my home computer your Chrome debug
extension works great, and is truly a thing of beauty! The problem
occurs only on the company web app I am working on in my job. I just
recently started working there, and am still ramping up learning their
web app. Basically the only thing wrong is that the knockout pane always
shows the root context, no matter which element is inspected. I suspect
that the problem is the over-complexity of the app itself, which to me
seems WAAAAAAYYY over-engineered, given what it does. I can't send you
the actual code, but as I go along I will try to reduce it to the
smallest structure that will repro the problem, and will send you that.

Again, I appreciate that you took the time to reply!

Cheers,
Doug Leary
Seattle

On 9/18/2014 12:16 AM, timstuyckens wrote:

Hi,

Do you have the issue on every website with knockoutjs ? If not, could
you specify a website/screenshot so I can see the issue. Picture is
thousand words :)
Could you please try it on the following website:
http://knockoutjs.com/examples/contactsEditor.html

This should give something like below

image
https://cloud.githubusercontent.com/assets/1768681/4316201/8ff410ca-3f03-11e4-9c78-de906dc47e11.png

What is the current version of the installed extension?
Should be 2.6.3
image
https://cloud.githubusercontent.com/assets/1768681/4316167/16e67a1a-3f03-11e4-8af6-daa1292b4af3.png


Reply to this email directly or view it on GitHub
#21 (comment).

No virus found in this message.
Checked by AVG - www.avg.com http://www.avg.com
Version: 2014.0.4765 / Virus Database: 4015/8231 - Release Date: 09/17/14

@timstuyckens
Copy link
Owner

A few points that may help

  • Try to disable serialization Constantly hangs the browser #9 (comment)
  • check how you instantiate the viewmodel, incorrect use of the new operator will put things in the global scope
  • Don't put any dom elements in the viewmodel

If this all fails, try selecting a dom element and type the following in the console

ko.dataFor($0))
ko.toJS(ko.dataFor($0)) 

@DougLeary
Copy link
Author

Wow, thanks! Forwarded to my work mail to try in the morning!

Doug

On 9/19/2014 12:33 AM, timstuyckens wrote:

A few points that may help

If this all fails, try selecting a dom element and type the following
in the console

ko.dataFor($0))
ko.toJS(ko.dataFor($0))


Reply to this email directly or view it on GitHub
#21 (comment).

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