ruby - wysihtml5-bootstrap cursor changing on submit -


i working wysihtml5-bootstrap gem ruby , using live text editor along pusher. when edit text inside 1 of text boxes, updates in other open views of save object. however, when update function called save content in box , update other open views of text, cursor moves beginning , renders service unusable unless user clicks after last word bring cursor ending position.

using wysihtml5 .html() function update view of text, possible save cursor position , have cursor move location after .html() function runs? love have cursor not move or placed @ last position after .html() function runs.

var channel = pusher.subscribe("update");         channel.bind("edit<%= @guide.id%>", function(data) {           // alert('attempting set value: ' + data.message);           var wysihtml5editor = $('#some-textarea').data("wysihtml5").editor;            // console.log(wysihtml5editor);            $(wysihtml5editor.composer.element).html(data.message);           console.log("new text is: " + $('#some-textarea').val());         }); 

above code listens specific event triggered pusher.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -