Browse Source

added functionality to plus button

markellekelly 5 years ago
parent
commit
8d9036ac6f
1 changed files with 5 additions and 0 deletions
  1. 5 0
      packages/celltags/src/addwidget.ts

+ 5 - 0
packages/celltags/src/addwidget.ts

@@ -100,6 +100,11 @@ export class AddWidget extends Widget {
       this.editing = true;
       this.input.value = '';
       this.input.focus();
+    } else if (event.target !== this.input) {
+      let value = this.input.value;
+      (this.parent as TagTool).addTag(value);
+      this.input.blur();
+      this._evtBlur();
     }
     event.preventDefault();
   }