diff --git a/scripts/elcode.js b/scripts/elcode.js index 2ed18867..c0f209e6 100755 --- a/scripts/elcode.js +++ b/scripts/elcode.js @@ -160,7 +160,6 @@ function elKeyPress(evt) document.form1.jcmd.value = "Submit"; chkform(); cond_submit(); - document.form1.Text.focus(); return false; } } diff --git a/src/elogd.c b/src/elogd.c index 90a11f19..659f0a24 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -9212,7 +9212,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("\n"); script[0] = 0; - if (isparam("inlineatt") && *getparam("inlineatt")) + if (isparam("inlineatt") && *getparam("inlineatt") || bpreview) strcpy(script, " OnLoad=\"document.form1.Text.focus();\""); strcat(script, " OnLoad=\"elKeyInit();\" OnFocus=\"elKeyInit();\"");