Permalink
Browse files

Middle click on linux. Fix #47

  • Loading branch information...
1 parent d4f03b6 commit da3269c46f694e9a7b42a215ff3741f1890bb31a @amasad amasad committed Jan 26, 2013
Showing with 11 additions and 6 deletions.
  1. +11 −6 jqconsole.coffee
View
@@ -668,12 +668,17 @@ class JQConsole
@Focus()
else
@$console.mouseup (e) =>
- fn = =>
- if not window.getSelection().toString()
- e.preventDefault()
- @Focus()
- # Force selection update.
- setTimeout fn, 0
+ # Focus immediatly when it's the middle click to support
+ # paste on linux desktop.
+ if e.which == 2
+ @Focus()
+ else
+ fn = =>
+ if not window.getSelection().toString()
+ e.preventDefault()
+ @Focus()
+ # Force selection update.
+ setTimeout fn, 0
# Mark the console with a style when it loses focus.
@$input_source.focus =>

0 comments on commit da3269c

Please sign in to comment.