In IE9 and IE10, the cursor jumps to the end of the text in the <textarea> when typing.
var data = {
text: 'Lorem ipsum dolor sit amet'
}
var App = {
view: function (v) {
return [
m('textarea', {
'value': data.text,
'oninput': m.withAttr('value', function (value) { data.text = value })
}),
m('pre', data.text)
]
}
}
m.mount(document.body, App)
Fiddle here. IE10 should just work. On IE9, visit the link above, log in, and then go to https://jsfiddle.net/draft/ to see the code running.
r in dolor.esExpected
Lorem ipsum dolores sit amet
Actual
Lorem ipsum dolore sit amets
Thanks for the report. This will probably be fixed by adding textarea.value to the attrs special cases in setAttr.
(based on https://github.com/pygy/mithril.js/blob/fix-1870-build/mithril.js)
@andraaspar this should be fixed in git HEAD
@pygy Thank you! I can confirm that the fiddle you sent works correctly.
Most helpful comment
@pygy Thank you! I can confirm that the fiddle you sent works correctly.