From a49a0b9ad3bcc946b997c7e5fe6d483a626c34c1 Mon Sep 17 00:00:00 2001 From: DanyaPostfactum Date: Sun, 21 Oct 2012 04:48:12 +1100 Subject: [PATCH] Fix webkit text.oninput value changing workaround --- lib/ace/keyboard/textinput.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index 58c49967..05df68fa 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -78,12 +78,12 @@ var TextInput = function(parentNode, host) { var tempStyle = ''; function resetValue() { + text.value = PLACEHOLDER; //http://code.google.com/p/chromium/issues/detail?id=76516 - if (!useragent.isWebKit) - text.value = PLACEHOLDER; - else + if (useragent.isWebKit) setTimeout(function(){ text.value = PLACEHOLDER; + resetSelection(); }); };