-
Notifications
You must be signed in to change notification settings - Fork 130
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
Linking from textarea picks up old value #2
Comments
I tried with adding this to line 654 in jquery.views.js:
But seems I do not understand enough of the source code, did not work.. Can someone help out? |
Ok Firebug is now my friend ;) In jquery.views.js:32 we check
where source maybe "textarea", but link.from is always:
because of line 337. |
I plan to add correct support for textarea, along with select, and inputs of various types in addition to text and checkbox etc. Hope to get to it before too long :) |
Great! Will it maybe also be possible to link the content of any element with data-to? Instead of a textarea I would like to use a div with the HTML5-attribute "contenteditable" and use for example the Aloha Editor on that. |
Hi , i was just wondering what the progress on this issue was, I was wondering if its worth writing my own hack for now or awaiting the next update. In my opinion the following need to be considered for linking. Input (all types, radio, checkbox, text etc) ps. I have written a jquery plugin to trigger the change event on contenteditable elements. |
Hello. I am working hard on moving JsRender towards a final beta API, and making good progress. (It is not visible progress yet, because it will involve a few breaking changes, so I don't want to commit yet - until I am confident enough of the design and have worked through some integration aspects with JsViews to make sure we have compatibility there too.) The plan is to get JsRender to beta (officially the goal is the end of February. May be slightly sooner), and then move to getting JsViews also to beta (goal April...). The JsViews beta will need to include at least inputs, textarea and select. Currently select is tricky because of some issues in IE, but the beta should allow that to work too. So it may be a little while before you get those features in JsViews, and you may prefer to write your hack if you need it sooner. On content editable, that is also a goal, but probably not for the beta. Is your plugin in on GitHub? If so, do send me a link. (But I may not look at it for a while...) |
This issue has been fixed in the latest commit: (pre beta commit counter: 8). |
Boris, do you have any plans to create a changeHandler for html5 contenteditable? |
This is the change event I wrote, you asked to take a peek a while back.
You can simply call Id image this isn't much use in jsviews tho. |
@blowsie: No plans right now. But it would be a good feature request, and if you want to create an issue to track it, I will triage it, probably as a post V1.1 feature request. Thanks...! We can link the issue (if you create one) back to here, and your code example... |
…ws#2) Improved sample for form elements, and included textarea example. http://borismoore.github.com/jsviews/demos/step-by-step/07_form-elements.html Integrated updated design for #index, from JsRender. Signed-off-by: Boris Moore <borismoore@gmail.com>
If fromHandler is "html" and $source is a textarea element, the value is picked up from the textarea element property "text".
However, this is the old unchanged value, so the linking does not work properly.
(The new value is found in the "value" property of textarea. Changing "text" to "value" seems to work fine.)
Update: although, it seems to introduce problems in IE8...
The text was updated successfully, but these errors were encountered: