diff --git a/src/renderer/components/ng-bubbles.component.ts b/src/renderer/components/ng-bubbles.component.ts index b26e67752b..30af4cda45 100644 --- a/src/renderer/components/ng-bubbles.component.ts +++ b/src/renderer/components/ng-bubbles.component.ts @@ -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) } diff --git a/src/renderer/styles/ng-bubbles.component.scss b/src/renderer/styles/ng-bubbles.component.scss index 2c071dc019..4ed83d6edf 100644 --- a/src/renderer/styles/ng-bubbles.component.scss +++ b/src/renderer/styles/ng-bubbles.component.scss @@ -33,9 +33,8 @@ .delete { margin-left: 0.25em; } - .editable { + .editable,.editablePlus { display: flex; - min-width: 50px; height: 20px; cursor: white; }