diff --git a/config.inc.php3 b/config.inc.php3
index 4ef17a385..89f6ea035 100755
--- a/config.inc.php3
+++ b/config.inc.php3
@@ -336,6 +336,7 @@ $cfg['TextareaCols'] = 40; // textarea size (columns) in edit m
// (this value will be emphasized (*2) for sql
// query textareas)
$cfg['TextareaRows'] = 7; // textarea size (rows) in edit mode
+$cfg['TextareaAutoSelect'] = TRUE; // autoselect when clicking in the textarea of the querybox
$cfg['LimitChars'] = 50; // max field data length in browse mode
$cfg['ModifyDeleteAtLeft'] = TRUE; // show edit/delete links on left side of browse
// (or at the top with vertical browse)
diff --git a/tbl_query_box.php3 b/tbl_query_box.php3
index a975de249..632c7934b 100755
--- a/tbl_query_box.php3
+++ b/tbl_query_box.php3
@@ -81,8 +81,11 @@ for ($i = 0 ; $i < $fields_cnt; $i++) {