From 17e5aa9fbf95c38c7896d9121fe53ac4f522d327 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Tue, 28 Oct 2014 20:09:23 +0200 Subject: 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. --- scripts/robot.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/robot.js') 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++; -- cgit v1.3.1