From ad8dc8e1890f8be824099df420dde7f031e18cfb Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 20 Oct 2007 17:54:15 +0000 Subject: [PATCH] bug #1805102, TextareaAutoSelect issues --- ChangeLog | 3 +++ js/querywindow.js | 5 +++++ libraries/config.default.php | 2 +- querywindow.php | 6 ++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 330922fd4632..fcb3ec4f48f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,9 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - it should not be possible to move or copy a table to information_schema - bug #1814733 win: copy db to mixed name db fails - bug #1777249 [display] Remove horizontal lines in navigation panel +- bug #1805102 [display] TextareaAutoSelect issues: set this parameter + default value to false to help cut&paste from a terminal window; also + set focus to the textarea 2.11.1.2 (2007-10-17) - fixed XSS in server_status.php, thanks to Omer Singer, The DigiTrust Group diff --git a/js/querywindow.js b/js/querywindow.js index c9821957f853..ba9fe6e18f83 100644 --- a/js/querywindow.js +++ b/js/querywindow.js @@ -12,6 +12,11 @@ function PMA_querywindowCommit(tab) return false; } +function PMA_querywindowSetFocus() +{ + document.getElementById('sqlquery').focus(); +} + function PMA_querywindowResize() { // for Gecko diff --git a/libraries/config.default.php b/libraries/config.default.php index 3c63b6d20024..b3328a5c2758 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -1772,7 +1772,7 @@ * * @global boolean $cfg['TextareaAutoSelect'] */ -$cfg['TextareaAutoSelect'] = true; +$cfg['TextareaAutoSelect'] = false; /** * textarea size (columns) for CHAR/VARCHAR diff --git a/querywindow.php b/querywindow.php index 08af2dd44f1f..1d16bfcf0d08 100644 --- a/querywindow.php +++ b/querywindow.php @@ -183,6 +183,12 @@ 'function' => 'PMA_querywindowResize', ); } +// always set focus to the textarea +$js_events[] = array( + 'object' => 'window', + 'event' => 'load', + 'function' => 'PMA_querywindowSetFocus', +); /** * start HTTP/HTML output