From: garvinhicking Date: Fri, 23 Jun 2006 09:32:42 +0000 (+0000) Subject: don'T focus on hidden fields X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=589f9723b1e9c448cc98ce01fa5c74cb1b6e0658;p=s9y.git don'T focus on hidden fields --- diff --git a/deployment/serendipity_editor.js b/deployment/serendipity_editor.js index a853e0b..bb36caf 100644 --- a/deployment/serendipity_editor.js +++ b/deployment/serendipity_editor.js @@ -155,7 +155,9 @@ function serendipity_insLink (area) { function serendipity_imageSelector_addToElement (str, el) { document.getElementById(el).value = str; - document.getElementById(el).focus(); + if (document.getElementById(el).type != 'hidden' && document.getElementById(el).focus) { + document.getElementById(el).focus(); + } if (document.getElementById(el).onchange) { document.getElementById(el).onchange(); } diff --git a/serendipity_editor.js b/serendipity_editor.js index 0ceaae0..7e9bdc4 100644 --- a/serendipity_editor.js +++ b/serendipity_editor.js @@ -155,7 +155,9 @@ function serendipity_insLink (area) { function serendipity_imageSelector_addToElement (str, el) { document.getElementById(el).value = str; - document.getElementById(el).focus(); + if (document.getElementById(el).type != 'hidden' && document.getElementById(el).focus) { + document.getElementById(el).focus(); + } if (document.getElementById(el).onchange) { document.getElementById(el).onchange(); }