     @removeDropTargetClasses()
 
     tabBar = event.target.closest('.tab-bar')
-    sortableObjects = tabBar.querySelectorAll(".sortable")
+    sortableObjects = tabBar.getTabs()
     placeholder = @getPlaceholder()
     return unless placeholder?
 

    @removePlaceholder()

  onDragEnd: (event) ->
    return unless matches(event.target, '.sortable')

    @clearDropTarget()


TabView = require './tab-view'

class TabBarView extends HTMLElement
  initialize: (@pane) ->
    @classList.add("list-inline")
    @classList.add("tab-bar")
    @classList.add("inset-panel")
    @setAttribute("tabindex", -1)

    @tabs = []
    @tabsByElement = new WeakMap
    @subscriptions = new CompositeDisposable
