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

Placeholders.js not working with Knockout.js on IE8? #59

Open
ktran13 opened this issue Dec 6, 2013 · 0 comments
Open

Placeholders.js not working with Knockout.js on IE8? #59

ktran13 opened this issue Dec 6, 2013 · 0 comments

Comments

@ktran13
Copy link

ktran13 commented Dec 6, 2013

It seems that the placeholders.js does not work when you have data-bindings from knockout attached to the input values. The placeholders will only show up after you click on the input values...

Here is the image of HTML and the knockout bindings, after a click. but you can see that the third input is empty.
image

Attached is code if needed to debug and determine the cause. I will be digging into this as well to understand a solution.
You will need to add the '<' to use the below code

div id="form">
input type="email" class="input-form" placeholder="Email Address" data-bind="value: email">
span data-bind="text: email">
input type="password" class="input-form" placeholder="Password" data-bind="value: password">
span data-bind="text: password">
input type="password" class="input-form" placeholder="Confirm Password" data-bind="value: confirmpassword">
input type="text" class="input-form" placeholder="testing">
/div>

script src="knockout-2.1.0.js"></script>
script src="placeholders.jquery.js"></script>
script>
function Info() {
this.email = ko.observable(),
this.password = ko.observable(),
this.confirmpassword = ko.observable();
}

var viewModel = new Info();
var elementBindingScope = document.getElementById('form');
ko.applyBindings(viewModel, elementBindingScope);

/script>

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

1 participant