summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnmol Agrawal <anmol1771@gmail.com>2014-09-29 21:38:42 +0530
committerAlon Levy <alon@pobox.com>2014-09-30 20:25:32 +0300
commitf5b744c81b6f39daf58e93a0d779391688a1bb07 (patch)
treeca78bd254648ec66977cdc02f0d1e29e471bb569
parent6530633074fc091d752f09c1e39b21d0714be4d0 (diff)
change #2 to issue #74
-rw-r--r--index.html2
-rw-r--r--scripts/rhizicore.js7
2 files changed, 8 insertions, 1 deletions
diff --git a/index.html b/index.html
index 5e17bd77..aa5ae7d2 100644
--- a/index.html
+++ b/index.html
@@ -41,7 +41,7 @@
<div class='editlinkinfo'>
<form id='editlinkform'>
- <input id="editlinkname"/>
+ <input id="editlinkname" onkeyup="Expand(this);"/>
</form>
</div>
diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js
index ca1265fa..0ac2f29a 100644
--- a/scripts/rhizicore.js
+++ b/scripts/rhizicore.js
@@ -1031,3 +1031,10 @@ function customSize(type) {
}
return size;
}
+
+function expand(obj){
+ if (!obj.savesize) {
+ obj.savesize = obj.size;
+ }
+ obj.size = Math.max(obj.savesize, obj.value.length);
+}