Fixed RE for stringhelper (but blur is not perfect yet)
diff --git a/dev/js/src/vc/stringval.js b/dev/js/src/vc/stringval.js
index f9aa593..cce278a 100644
--- a/dev/js/src/vc/stringval.js
+++ b/dev/js/src/vc/stringval.js
@@ -119,10 +119,25 @@
if (this.value() !== undefined)
this._input.value = this.value();
- this._input.addEventListener(
+ // Add regex button
+ var re = e.appendChild(
+ document.createElement('div')
+ );
+ re.addEventListener(
+ 'click',
+ function (e) {
+ this.toggleRegex();
+ e.halt();
+ }.bind(this),
+ true
+ );
+ re.appendChild(document.createTextNode('RE'));
+
+ e.addEventListener(
'blur',
- function () {
+ function (e) {
this.store(this.value(), this.regex());
+ e.halt();
}.bind(this)
);
@@ -137,16 +152,6 @@
}.bind(this)
);
- // Add regex button
- var re = e.appendChild(
- document.createElement('div')
- );
- re.addEventListener('click', function (e) {
- this.toggleRegex();
- e.halt();
- }.bind(this));
- re.appendChild(document.createTextNode('RE'));
-
// Add store button
/*
e.appendChild(