Skip to content

Commit 53eb87a

Browse files
committed
fix: prevent default action on history log rename
1 parent 85c2ef9 commit 53eb87a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/static/history.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ async function editName(hash) {
231231
const cell = document.getElementById(`name-${hash}`);
232232
const currentName = entry.name;
233233

234-
cell.innerHTML = `<input type="text" class="name-input" value="${currentName}" id="input-${hash}" onblur="saveName('${hash}')" onkeypress="if(event.key==='Enter') saveName('${hash}')">`;
234+
cell.innerHTML = `<input type="text" class="name-input" value="${currentName}" id="input-${hash}" onblur="saveName('${hash}')" onkeypress="if(event.key==='Enter') { saveName('${hash}'); event.preventDefault(); }">`;
235235

236236
const input = document.getElementById(`input-${hash}`);
237237
input.focus();

0 commit comments

Comments
 (0)