fix editor

This commit is contained in:
nate smith 2024-03-16 15:24:24 -07:00
parent 9be83c0fca
commit f35ea741de
2 changed files with 3 additions and 4 deletions

View File

@ -108,7 +108,6 @@ class LineEditor extends Button {
done() {
this.setAttribute("title", "edit line text");
this.editing = false;
//this.innerText = "✎";
this.innerText = "E";
this.linetext.innerText = this.i.value;
this.f.remove();
@ -123,10 +122,10 @@ class LineEditor extends Button {
this.editing = true;
this.setAttribute("title", "finish editing");
this.innerHTML = "<strong>✓</strong>";
const l = this.linetext.parentElement;
this.linetext.style.display = "none";
//this.linetext.setAttribute("style", "display:none");
this.i.value = this.linetext.innerText;
this.parentElement.appendChild(this.f);
l.appendChild(this.f);
this.i.focus();
}
}

View File

@ -45,7 +45,7 @@ a {
<body>
<template id="line-editor-tmpl">
<form style="display:inline">
<input type="text" name="editedLine" style="min-width: 50em">
<input type="text" name="editedLine" style="min-width: 30em; max-width:40em">
<input type="submit" style="display: none">
</form>
</template>