I wouldn't maintain cursor state in the model; I'd just implement the port like this:
http://stackoverflow.com/a/14508837/2334666
In other words, you never use the value attribute on the input; rather, you give it a unique key and don't touch it directly. Whenever you want to change its value, just send the desired new value to that port and let the JS snippet do the "stash cursor position, set the new value, restore cursor position" bit.
If you need to do this for multiple elements, send a DOM query string to the port and call document.querySelectorAll (or the like) with it to apply the logic to the correct element.
Does that seem reasonable?