Commit 721f90c6 authored by HERBERT Ryan's avatar HERBERT Ryan
Browse files

list.js restore list element onclick after edit

Editing the name of a list element cause said element to lose its
onclick, therefore no longer being selectable.
An edited element now regains its original onclick event when the edit
input loses focus.
parent 75e01801
......@@ -602,6 +602,7 @@ List.prototype = {
this.update();
}
var divParent = elem;
var old_event = divParent.onclick;
divParent.innerHTML = "";
if (cloneID[0] == 's')
......@@ -623,6 +624,7 @@ List.prototype = {
}
$(input).focusout(function() {
setTimeout(function(){self.m.update()},500)
divParent.onclick = old_event;
})
divParent.appendChild(input);
divParent.onclick = "";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment