From fc063b8fc31ed16c801da3070fbfaa8f191a1e1c Mon Sep 17 00:00:00 2001 From: Exile Date: Fri, 29 Aug 2014 01:45:46 +0400 Subject: [PATCH] Quote selected MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Фикс цитаты выделенного. --- upload/misc/js/bbcode.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/upload/misc/js/bbcode.js b/upload/misc/js/bbcode.js index 044fd45c6..d437b6f45 100644 --- a/upload/misc/js/bbcode.js +++ b/upload/misc/js/bbcode.js @@ -78,6 +78,11 @@ BBCode.prototype = { getSelection: function() { var w = window; var text='', range; + if (w.getSelection) { + text = w.getSelection(); + } else { + return [null, null]; + } if (text == '') text = this.stext; text = ""+text; text = text.replace("/^\s+|\s+$/g", "");