Closed vylgin closed 9 years ago
1+
vylgin, can you please let me know if you fixed it? i am still looking for fix for it
I still did not fix it. I'm looking for too. If I find a solution, then write about it
File jquery.wysibb.js contains
//insert BR on press enter
this.$body.bind('keydown',$.proxy(function(e) {
if (e.which == 13) {
var isLi = this.isContain(this.getSelectNode(),'li');
if (!isLi) {
if (e.preventDefault) {e.preventDefault();}
this.checkForLastBR(this.getSelectNode());
this.insertAtCursor('<br/>',false);
}
}
},this));
I think we can solve the problem by refactor this code.
i have the same problem, any ideas?
Problem solved! Added the two bold lines in the context described below.
execNativeCommand: function(cmd,param) {
...
}else if (cmd=="insertHTML") { //fix webkit bug with insertHTML var sel = this.getSelection(); var e = this.elFromString(param); var rng = (this.lastRange) ? this.lastRange:this.getRange(); rng.deleteContents(); rng.insertNode(e); rng.setStartAfter(e); rng.setEndAfter(e); rng.collapse(false); sel.removeAllRanges(); sel.addRange(rng);
Thanks!
Fixed by Oliverlost. Thanks.
If I click on the button Enter, a new text line is added, and the cursor don't move down in Safari on OS X (http://www.wysibb.com/demo).