Patch #33958 » 0001-Jump-to-end-of-line-for-ul-ol-and-quote-when-line-is.patch
public/javascripts/jstoolbar/jstoolbar.js | ||
---|---|---|
338 | 338 |
} else if (typeof(this.textarea["setSelectionRange"]) != "undefined") { |
339 | 339 |
this.textarea.value = this.textarea.value.substring(0, start) + subst + |
340 | 340 |
this.textarea.value.substring(end); |
341 |
if (sel) { |
|
341 |
if (sel || (!prefix && start === end)) {
|
|
342 | 342 |
this.textarea.setSelectionRange(start + subst.length, start + subst.length); |
343 | 343 |
} else { |
344 | 344 |
this.textarea.setSelectionRange(start + prefix.length, start + prefix.length); |