     @inputValue value unless @_inputValue == value
   
   @method '_inputValueChanged', (oldValue, newValue) ->
-    if @_loaded && @_inputElement.val != newValue
+    newValue = ST.trim newValue
+  
+    if @_loaded && ST.trim(@_inputElement.val()) != newValue
       if newValue == '' && !@_focused
         @_inputElement.css 'color', 'gray'
         @_inputElement.val @_placeholder

      else
        @showResults (@_scope || @_model).search(search)
    else
      @_resultListElement.hide()
  
  @method 'showSearchProgress', ->

  @method 'inputKeyDown', (event) ->
    event.stopPropagation()
    switch event.which
      when 38 # Up
        if @_results
          if @_selectedResult > 0
            @selectedResult(@_selectedResult - 1)
          else
            @selectedResult(@_results.length - 1)
        event.preventDefault()
      when 40 # Down
        if @_results
          if @_selectedResult < @_results.length - 1
            @selectedResult(@_selectedResult + 1)
          else
            @selectedResult(0)
        event.preventDefault()
      when 13 # Enter
        @blur() if @_selectedResult >= 0 || @_inputValue == ''
        event.preventDefault()
      when 27 # Escape
        @blur()
        event.preventDefault()
      when 48, 190, 110 # 0
        if @_canCreate
          @selectedResult(@_results.length - 1)
          @blur()
          event.preventDefault()
      when 9 # Tab
        event.preventDefault() if @_searching || @_results
      else
        if ST.ModelFieldView.KEY_CODES[event.which]?
          n = ST.ModelFieldView.KEY_CODES[event.which]
