                 @$el.find('.tt-dropdown-menu').css 'width': width
             else
                 @$el.find('.tt-dropdown-menu').css 'width': 'auto'
+
         enableTypeahead: (selector) ->
             @$searchEl = @$el.find selector
             serviceDataset =

                    app.commands.execute 'selectPosition', data
        getQuery: () ->
            return $.trim @$searchEl.val()
        executeQuery: () ->
            @geocoderBackend.street = null
            @$searchEl.typeahead 'close'
            app.commands.execute 'search', @getInputText()
        autosuggestShowDetails: (ev, data, _) ->
            # Remove focus from the search box to hide keyboards on touch devices.
            # TODO: re-enable in a compatible way

    class SearchInputView extends base.SMItemView
        classname: 'search-input-element'
        template: 'navigation-search'

        initialize: (@model, @searchResults) ->
            @listenTo @searchResults, 'ready', @adaptToQuery
            @listenTo @searchResults, 'reset', =>
                if @searchResults.isEmpty()
                    @setInputText ''

        adaptToQuery: (model, value, opts) ->
            $container = @$el.find('.action-button')
            $icon = $container.find('span')
