diff options
| author | Alon Levy <alon@pobox.com> | 2014-10-28 20:09:23 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-10-28 20:09:23 +0200 |
| commit | 17e5aa9fbf95c38c7896d9121fe53ac4f522d327 (patch) | |
| tree | 4528d31fec6f45204d9b8a4d8d4e3ee30def626e /scripts | |
| parent | 1169d0fff03ee7642a8b5e06462781f8996bb6e5 (diff) | |
robot: unbreak - setting value doesn't trigger input event
Broken since e299a57a72ee786818cad4f9b8e3aea3b6fb8544
Polling replaced by input event. Polling was a catch all - it checked
value change. catching events requires they be thrown, so throw an input
even explicitly from robot.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/robot.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/robot.js b/scripts/robot.js index 15265b78..420b75a7 100644 --- a/scripts/robot.js +++ b/scripts/robot.js @@ -35,6 +35,9 @@ var robot = function (element, sentence) { r.counter++; if (r.sentence.charAt(r.counter) !== "|") { r.element.val(text + r.sentence.charAt(r.counter)); + if ('oninput' in document.documentElement) { + r.element.trigger('input', {}); + } //if(Math.random()>0.9)graph.editType("x","temp",nodetypes[Math.round(Math.random()*4)]); if (r.sentence.charAt(r.counter)==="#") { r.sentencecounter++; |
