Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

el.setAttribute(name, value) not resulting in a browser visual change/update when triggered from console #337

Open
Meai1 opened this issue May 8, 2017 · 1 comment

Comments

@Meai1
Copy link

Meai1 commented May 8, 2017

Browsers showing this behavior:
Chrome 58
Firefox 54.0a2

Expected behavior:
The input textfield should show the correct updated value just like the red box will update to the new value at all times.

Actual behavior:

Red box resizes correctly but input textfield does not show the new value.

Steps to reproduce:

*Disclaimer: * I don't know why these steps are needed to reproduce it, but this is the only way you can reproduce. I tried other ways via browser events and they wouldn't reproduce it. So you have to do it exactly like this. I provided a fiddle so it's easier to reproduce for you.

  1. Open http://jsfiddle.net/stvmyrwL/
  2. Type any number into the textfield
  3. Now open the developer console, in jsfiddle you need to be in the right context so change it like this:

2017-05-08 15_33_40-edit fiddle - jsfiddle

Now enter this in the developer console: observableUser2.age = 95

  1. As you can see, the red box rerenders with the correct value. But the input field (despite displaying the correct value when you query for it as a next possible step,) does not show it visually in the browser.

Fix:

Change line incremental-dom.js:923 from el.setAttribute(name, value); to el[name] = value;

@jridgewell
Copy link
Contributor

Dupe of #239. We're moving to a system that allows you to tell iDOM how to patch attributes (as either an attribute or property) in #332.

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

No branches or pull requests

2 participants