 
             # We just look at key up so we don't fire the call 3 times
             # TODO Make it flawless. I'm not sure that's the desired behavior
-            if event?.type? and event.type isnt 'keyup' or (event?.which? and event.which is 16) # We don't do anything for shift
+            if event?.type? and (event.type isnt 'keyup' and event.type isnt 'mouseup') or (event?.which? and event.which is 16) # We don't do anything for shift
                 return false
 
             @current_highlighted_suggestion = -1

                        suggestion: suggestion
                @show_suggestion()
                @hide_description()
            else if result.description?
                @hide_suggestion()
                @show_description result.description
            else

        query_first_part: ''
        query_last_part: ''

        handle_click: (event) =>
            @handle_keypress null, event

        # Core of the suggestions' system: We have to parse the query
        # Return true if we want code mirror to ignore the event
        handle_keypress: (editor, event) =>
            # Let's hide the tooltip if the user just clicked on the textarea. We'll only display later the suggestions if there are (no description)
            if event?.type is 'mouseup'
                @hide_suggestion_and_description()

            # Save the last query (even incomplete)
            @saved_data.current_query = @codemirror.getValue()
            @save_data_in_localstorage()
