diff --git a/UI/WebServerResources/UIxMailEditor.js b/UI/WebServerResources/UIxMailEditor.js index 829b9c9de..d7fb2402e 100644 --- a/UI/WebServerResources/UIxMailEditor.js +++ b/UI/WebServerResources/UIxMailEditor.js @@ -104,6 +104,13 @@ function insertContact(inputNode, contactName, contactEmail) { inputNode.value = value; } +function updateWindowTitleFromSubject(event) { + if (this.value) { + document.title = this.value; + }else{ + document.title = _("Untitled"); + } +} /* mail editor */ @@ -416,6 +423,9 @@ function initMailEditor() { configureDragHandle(); + // Change the window title when typing the subject + $$("div#subjectRow input").first().on("keyup", updateWindowTitleFromSubject); + var composeMode = UserDefaults["SOGoMailComposeMessageType"]; if (composeMode == "html") { CKEDITOR.replace('text',