       @element.classList.remove('hidden')
 
   getTabs: ->
-    @children('.tab').toArray()
+    tab for tab in @element.querySelectorAll(".tab")
 
   tabAtIndex: (index) ->
-    @children(".tab:eq(#{index})")[0]
+    @element.querySelectorAll(".tab")[index]
 
   tabForItem: (item) ->
     _.detect @getTabs(), (tab) -> tab.item is item

    @setActiveTab(@tabForItem(@pane.getActiveItem()))

  closeTab: (tab) ->
    tab ?= @children('.right-clicked')[0]
    @pane.destroyItem(tab.item) if tab?

  splitTab: (fn) ->
    if item = @children('.right-clicked')[0]?.item
      if copiedItem = @copyItem(item)
        @pane[fn](items: [copiedItem])



  closeOtherTabs: (active) ->
    tabs = @getTabs()
    active ?= @element.querySelector('.right-clicked')
    return unless active?
    @closeTab tab for tab in tabs when tab isnt active

  closeTabsToRight: (active) ->
    tabs = @getTabs()
    active ?= @element.querySelector('.right-clicked')
    index = tabs.indexOf(active)
    return if index is -1
    @closeTab tab for tab, i in tabs when i > index
