* only doubleclick on task title will open task editor, not on notes

This commit is contained in:
maxpozdeev 2022-07-11 00:09:01 +03:00
parent dc155f000e
commit 307386554f

View file

@ -434,14 +434,14 @@ var mytinytodo = window.mytinytodo = _mtt = {
}
});
$('#tasklist').on('dblclick', '> li.task-row', function(){
//clear selection
if(document.selection && document.selection.empty && document.selection.createRange().text) document.selection.empty();
else if(window.getSelection) window.getSelection().removeAllRanges();
$('#tasklist').on('dblclick', '> li.task-row .task-middle', function(){
var id = parseInt(getLiTaskId(this));
if (id) {
//clear selection
if (document.selection && document.selection.empty && document.selection.createRange().text) document.selection.empty();
else if(window.getSelection) window.getSelection().removeAllRanges();
if (this.id) {
var id = this.id.split('_',2)[1];
if (id) editTask(parseInt(id));
editTask(parseInt(id));
}
});