 
         show_next_batch: (event) =>
             event.preventDefault()
-            $(window).scrollTop(@$el.offset().top)
+            $(window).scrollTop(@$('.tab-content').offset().top)
             @view_object?.show_next_batch()
 
     class OptionsView extends Backbone.View

# 400 bad request when aborting changefeed
# table view shows no results when it means "no more results" or "no results yet"
# abort button blinks when runnign a normal query

    class DriverHandler
        constructor: (options) ->
            @container = options.container
            @concurrent = 0
            @total_duration = 0

        _begin: =>
            if @concurrent == 0
                @container.toggle_executing true
                @begin_time = new Date()
            @concurrent++

        _end: =>
            if @concurrent > 0
                @concurrent--
                now = new Date()
                @total_duration += now - @begin_time
                @begin_time = now
            if @concurrent == 0
                @container.toggle_executing false

        close_connection: =>
            if @connection?.open is true
                driver.close @connection
                @connection = null
                @_end()

        run_with_new_connection: (query, {callback, connection_error, optargs}) =>
            @close_connection()
            @total_duration = 0
            @concurrent = 0

            driver.connect (error, connection) =>
                if error?
                    connection_error error
                connection.removeAllListeners 'error' # See issue 1347
                connection.on 'error', (error) =>
                    connection_error error
                @connection = connection
                @_begin()
                query.private_run connection, optargs, (error, result) =>
                    @_end()
                    callback error, result

        cursor_next: (cursor, {error, row, end}) =>
            if not @connection?
                end()
            @_begin()
            cursor.next (err, row_) =>
                @_end()
                if err?
                    if err.message is 'No more rows in the cursor.'
                        end()
