From a9d7e0c761877fcd8889cfb7fb5f9edbba9521b6 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Wed, 21 Mar 2007 18:15:51 +0000 Subject: [PATCH] Set focus to edit box after preview SVN revision: 1813 --- scripts/elcode.js | 1 - src/elogd.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) 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();\"");