Skip to content

Commit

Permalink
Don't use !
Browse files Browse the repository at this point in the history
  • Loading branch information
lynn committed Jan 1, 2025
1 parent 6ea1bb0 commit d3e10fb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions frontend/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ export default defineComponent({
focus_body(): void {
setTimeout(() => {
const body = document.getElementById('create_body')!;
body.focus();
document.getElementById('create_body')?.focus();
}, 0);
},
Expand Down Expand Up @@ -461,16 +460,16 @@ export default defineComponent({
) as HTMLTextAreaElement;
if (!create) return;
const clone = create.cloneNode() as HTMLTextAreaElement;
create.parentNode!.insertBefore(clone, create);
create.parentNode?.insertBefore(clone, create);
clone.style.visibility = 'hidden';
// clone.style.position = 'absolute';
clone.style.height = 'auto';
// clone.style.width = create.scrollWidth + 'px';
clone.value = create.value;
let u = clone.scrollTop + clone.scrollHeight;
if (u > 40) u += 1;
create.style.height = u + 'px';
clone.parentNode!.removeChild(clone);
create.style.height = `${u}px`;
clone.parentNode?.removeChild(clone);
},
focus_search(): void {
Expand Down

0 comments on commit d3e10fb

Please sign in to comment.