From 961918d444475251751e0a6d7ff9645685ef3952 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 20 Jan 2014 03:02:24 -0500 Subject: [PATCH] refactor(console) mouseup --- lib/client/console.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/client/console.js b/lib/client/console.js index d68a0d2b..793d5639 100644 --- a/lib/client/console.js +++ b/lib/client/console.js @@ -83,8 +83,11 @@ var CloudCmd, Util, DOM, CloudFunc, $; $(l$Console).unbind('mouseup'); $(l$Console).mouseup(function() { - if( !window.getSelection().toString() ) { - var lTop = l$Console.scrollTop(); + var top, + isSelection = window.getSelection().toString(); + + if (!isSelection) { + top = l$Console.scrollTop(); lFocus(); l$Console.scrollTop(lTop);