Skip to content

Commit

Permalink
bug #1805102, TextareaAutoSelect issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lem9 committed Oct 20, 2007
1 parent 6342e82 commit ad8dc8e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions js/querywindow.js
Expand Up @@ -12,6 +12,11 @@ function PMA_querywindowCommit(tab)
return false;
}

function PMA_querywindowSetFocus()
{
document.getElementById('sqlquery').focus();
}

function PMA_querywindowResize()
{
// for Gecko
Expand Down
2 changes: 1 addition & 1 deletion libraries/config.default.php
Expand Up @@ -1772,7 +1772,7 @@
*
* @global boolean $cfg['TextareaAutoSelect']
*/
$cfg['TextareaAutoSelect'] = true;
$cfg['TextareaAutoSelect'] = false;

/**
* textarea size (columns) for CHAR/VARCHAR
Expand Down
6 changes: 6 additions & 0 deletions querywindow.php
Expand Up @@ -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
Expand Down

0 comments on commit ad8dc8e

Please sign in to comment.