mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-06 22:08:51 +00:00
Monotone-Parent: 80314eb2f15e5d1fc369f56a8001f005ba7e0f5f
Monotone-Revision: 3bc573b09449f0efea891e5e11a232520f51205c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-20T19:15:22 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -242,8 +242,11 @@ function clickedEditorSave(sender) {
|
||||
}
|
||||
|
||||
function onTextFocus() {
|
||||
this.insertBefore(document.createTextNode("\r\n"),
|
||||
this.lastChild);
|
||||
var content = this.getValue();
|
||||
if (content.lastIndexOf("--") == 0) {
|
||||
this.insertBefore(document.createTextNode("\r\n"),
|
||||
this.lastChild);
|
||||
}
|
||||
if (signatureLength > 0) {
|
||||
var length = this.getValue().length - signatureLength - 1;
|
||||
this.setSelectionRange(length, length);
|
||||
@@ -272,8 +275,8 @@ function initMailEditor() {
|
||||
var sigLimit = textContent.lastIndexOf("--");
|
||||
if (sigLimit > -1)
|
||||
signatureLength = (textContent.length - sigLimit);
|
||||
Event.observe(textarea, "focus",
|
||||
onTextFocus.bindAsEventListener(textarea));
|
||||
textarea.observe("focus", onTextFocus);
|
||||
textarea.scrollTop = textarea.offsetHeight;
|
||||
|
||||
onWindowResize(null);
|
||||
Event.observe(window, "resize", onWindowResize);
|
||||
|
||||
Reference in New Issue
Block a user