Reset event handlers after cloning (thanks to Salko)

This commit is contained in:
Jakub Vrana 2018-07-15 20:09:48 +02:00
parent cf76ad529b
commit df90d9f68c
3 changed files with 4 additions and 3 deletions

View file

@ -509,8 +509,8 @@ function dumpClick(event) {
* @this HTMLSelectElement
*/
function foreignAddRow() {
this.onchange = function () { };
var row = cloneNode(parentTag(this, 'tr'));
this.onchange = function () { };
var selects = qsa('select', row);
for (var i=0; i < selects.length; i++) {
selects[i].name = selects[i].name.replace(/\]/, '1$&');
@ -525,8 +525,8 @@ function foreignAddRow() {
* @this HTMLSelectElement
*/
function indexesAddRow() {
this.onchange = function () { };
var row = cloneNode(parentTag(this, 'tr'));
this.onchange = function () { };
var selects = qsa('select', row);
for (var i=0; i < selects.length; i++) {
selects[i].name = selects[i].name.replace(/indexes\[\d+/, '$&1');

View file

@ -1,5 +1,6 @@
Adminer 4.6.4-dev:
Fix inline editing of empty cells (regression from 4.6.3)
Allow adding more than two indexes and forign key columns at a time (regression from 4.4.0)
Adminer 4.6.3 (released 2018-06-28):
Disallow using password-less databases

View file

@ -55,8 +55,8 @@ function whisperClick(event) {
* @this HTMLInputElement
*/
function emailFileChange() {
this.onchange = function () { };
var el = this.cloneNode(true);
this.onchange = function () { };
el.value = '';
this.parentNode.appendChild(el);
}