diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index d6a26f2..4772115 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -243,8 +243,9 @@
      * Get the element associated with the virtual collection
      */
     element : function () {
-      if (this._element !== undefined)
-	return this._element;
+      if (this._element !== undefined) {
+	      return this._element;
+      };
 
       this._element = document.createElement('div');
       this._element.setAttribute('class', 'vc');
@@ -270,18 +271,18 @@
      * as a creation date limit criterion.
      */
     makePersistant : function () {
-//      this.root().wrapOnRoot('and');
+      // this.root().wrapOnRoot('and');
       var todayStr = KorAP._vcDatePicker.today();
       var doc = docClass.create();
       var root = this.root();
 
       if (root.ldType() === 'docGroup' &&
-	  root.operation === 'and') {
-	root.append(cond);
+	        root.operation === 'and') {
+	      root.append(cond);
       }
       else {
-	root.wrapOnRoot('and');
-	root.append(doc);
+	      root.wrapOnRoot('and');
+	      root.append(doc);
       };
 
       doc.key("creationDate");
diff --git a/dev/js/src/vc/stringval.js b/dev/js/src/vc/stringval.js
index 595057a..1cebde4 100644
--- a/dev/js/src/vc/stringval.js
+++ b/dev/js/src/vc/stringval.js
@@ -87,11 +87,14 @@
   /**
    * Store the string value.
    * This method should be overwritten.
-   * The method receives the the value and the regex.
+   * The method receives the value and the regex.
    */
   store : function (v,r) {},
 
 
+  /**
+   * Put focus on element
+   */
   focus : function () {
     this._element.children[0].focus();
   },
@@ -127,26 +130,47 @@
     );
     re.addEventListener(
       'click',
-      function (e) {
+      function (ev) {
 	      this.toggleRegex();
-	      e.halt();
+        // ev.halt();
       }.bind(this),
       true
     );
     re.appendChild(document.createTextNode('RE'));
 
-    e.addEventListener(
+    // If the focus is not on the text field anymore,
+    // delegate focus to
+    this._input.addEventListener(
       'blur',
-      function (e) {
-	      this.store(this.value(), this.regex());
-	      e.halt();
+      function (ev) {
+        if (!this._inField) {
+	        this.value(this._input.value);
+          this.store(this.value(), this.regex());
+        };
+        ev.halt();
+      }.bind(this)
+    );
+
+    // Workaround to check the click is in the field
+    e.addEventListener(
+      'mousedown',
+      function (ev) {
+        this._inField = true;
+      }.bind(this)
+    );
+
+    e.addEventListener(
+      'mouseup',
+      function (ev) {
+        this._inField = false;
+        this._input.focus();
       }.bind(this)
     );
 
     this._input.addEventListener(
       'keypress',
-      function (e) {
-	      if (e.keyCode == 13) {
+      function (ev) {
+	      if (ev.keyCode == 13) {
 	        this.value(this._input.value);
 	        this.store(this.value(), this.regex());
           return false;
