From 7cc950253956a051f2926dd636e6fee7c9332e08 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 9a221e3c..8e7cbdab 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(); }); };