From 0be30318c0f44841e06c6b1b06e51d0668d9ab21 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 7 Dec 2011 23:24:51 +0100 Subject: [PATCH] WTF OPERA??? --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 5123d6158..6b61ab04f 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1687,7 +1687,7 @@ caretPos = ta.selectionStart; ta.value = ta.value.slice(0, caretPos) + text + ta.value.slice(ta.selectionEnd, ta.value.length); ta.focus(); - return ta.selectionStart = ta.selectionEnd = caretPos + text.length; + return ta.selectionEnd = ta.selectionStart = caretPos + text.length; }, refresh: function() { var m, newFile, oldFile, _ref; diff --git a/script.coffee b/script.coffee index 08a0c1ddf..1b4da00f2 100644 --- a/script.coffee +++ b/script.coffee @@ -1325,7 +1325,7 @@ qr = ta.value = ta.value.slice(0, caretPos) + text + ta.value.slice(ta.selectionEnd, ta.value.length) ta.focus() #move the caret to the end of the new quote - ta.selectionStart = ta.selectionEnd = caretPos + text.length + ta.selectionEnd = ta.selectionStart = caretPos + text.length refresh: -> $('[name=sub]', qr.el).value = ''