我的问题是当我点击编辑按钮时,jquery make会使editabletext字段成为焦点。这是我的代码
$('.edit').click(function() {
$('#editingTask').focus();
});
<ul>
{{#each tasksToDo}}
{{>task}}
{{/each}}
</ul>
<template name="task">
<li class="list_item">
<span id="editingTask">{{> editableText collection="tasks" field="title"}}</span>
<br>
<div class="editBt">
<button class="completed">Completed</button>
<button class="edit">Edit</button>
<button class="delete">Delete</button>
</div>
</li>
</tempate>