Fix Enter key on indexes

This commit is contained in:
Jakub Vrana 2013-07-10 12:44:03 -07:00
parent 73225975d7
commit bbc2c6a9da
2 changed files with 7 additions and 2 deletions

View file

@ -90,7 +90,12 @@ if (!$row) {
<form action="" method="post">
<table cellspacing="0" class="nowrap">
<thead><tr><th><?php echo lang('Index Type'); ?><th><?php echo lang('Column (length)'); ?><th><?php echo lang('Name'); ?><th><noscript><input type='image' class='icon' name='add[0]' src='../adminer/static/plus.gif' alt='+' title='<?php echo lang('Add next'); ?>'></noscript>&nbsp;</thead>
<thead><tr>
<th><?php echo lang('Index Type'); ?>
<th><input type="submit" style="z-index: -1; position: absolute; height: 0;"><?php echo lang('Column (length)'); ?>
<th><?php echo lang('Name'); ?>
<th><noscript><input type='image' class='icon' name='add[0]' src='../adminer/static/plus.gif' alt='+' title='<?php echo lang('Add next'); ?>'></noscript>&nbsp;
</thead>
<?php
$j = 1;
foreach ($row["indexes"] as $index) {

View file

@ -635,7 +635,7 @@ function findDefaultSubmit(form) {
var inputs = form.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i++) {
var input = inputs[i];
if (input.type == 'submit') {
if (input.type == 'submit' && !input.style.zIndex) {
return input;
}
}