From adebe0653d810307dd66ea2072ca2fb9508dc2f1 Mon Sep 17 00:00:00 2001 From: "neil%parkwaycc.co.uk" Date: Sun, 14 Sep 2003 14:20:06 +0000 Subject: [PATCH] Bug 216564 Editor does not remove blank image title r=brade sr=rbs git-svn-id: svn://10.0.0.236/trunk@146865 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/ui/dialogs/content/EdImageOverlay.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mozilla/editor/ui/dialogs/content/EdImageOverlay.js b/mozilla/editor/ui/dialogs/content/EdImageOverlay.js index 24b19288dc1..3dcf7c0027f 100644 --- a/mozilla/editor/ui/dialogs/content/EdImageOverlay.js +++ b/mozilla/editor/ui/dialogs/content/EdImageOverlay.js @@ -524,7 +524,11 @@ function ValidateImage() var src = TrimString(gDialog.srcInput.value); globalElement.setAttribute("src", src); - globalElement.setAttribute("title", TrimString(gDialog.titleInput.value)); + var title = TrimString(gDialog.titleInput.value); + if (title) + globalElement.setAttribute("title", title); + else + globalElement.removeAttribute("title"); // Force user to enter Alt text only if "Alternate text" radio is checked // Don't allow just spaces in alt text