Skip to content

Commit

Permalink
cursor placement is good in editable bubs
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartondock committed Oct 17, 2024
1 parent 8f753a7 commit 333bd3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/renderer/components/ng-bubbles.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ export class NgBubblesComponent implements ControlValueAccessor {
makeLiveItem(index: number) {
if (this.addable && !this.editing[index]) {
this.editing[index] = true;
const addable = this.items[index];
this.addables[index] = addable;
this.addables[index] = this.items[index];
const self=this;
setTimeout(()=> {
const inputEl = document.querySelector(".editable") as HTMLTextAreaElement;
inputEl.innerHTML = addable;
const len = self.addables[index].length
self.setInnerHtml(inputEl,self.addables[index], {start: len, end: len})
inputEl.focus();
}, 100)
}
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/styles/ng-bubbles.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
.delete {
margin-left: 0.25em;
}
.editable {
.editable,.editablePlus {
display: flex;
min-width: 50px;
height: 20px;
cursor: white;
}
Expand Down

0 comments on commit 333bd3a

Please sign in to comment.