diff options
| author | Anmol Agrawal <anmol1771@gmail.com> | 2014-09-29 21:38:42 +0530 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-09-30 20:25:32 +0300 |
| commit | f5b744c81b6f39daf58e93a0d779391688a1bb07 (patch) | |
| tree | ca78bd254648ec66977cdc02f0d1e29e471bb569 | |
| parent | 6530633074fc091d752f09c1e39b21d0714be4d0 (diff) | |
change #2 to issue #74
| -rw-r--r-- | index.html | 2 | ||||
| -rw-r--r-- | scripts/rhizicore.js | 7 |
2 files changed, 8 insertions, 1 deletions
@@ -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); +} |
