morassman/tabasco

Uncaught TypeError: Cannot read property 'offsetHeight' of undefined

Closed this issue · 1 comments

abe33 commented

[Enter steps to reproduce below:]

As far as I can tell, the issue occurs when starting to drag a tab and one of the available panes holds no editors at the moment.

Atom Version: 1.8.0-dev-ffe33cb
System: Mac OS X 10.11.3
Thrown From: tabasco package, v0.3.0

Stack Trace

Uncaught TypeError: Cannot read property 'offsetHeight' of undefined

At /Users/cedric/.atom/packages/tabasco/lib/tabasco-zone.coffee:14

TypeError: Cannot read property 'offsetHeight' of undefined
    at tabasco-zone.module.exports.TabascoZone.initialize (/Users/cedric/.atom/packages/tabasco/lib/tabasco-zone.coffee:14:40)
    at Object.module.exports.Tabasco.addZones (/Users/cedric/.atom/packages/tabasco/lib/tabasco.coffee:109:10)
    at Object.module.exports.Tabasco.onDragStart (/Users/cedric/.atom/packages/tabasco/lib/tabasco.coffee:89:10)
    at atom-tabs.<anonymous> (/Users/cedric/.atom/packages/tabasco/lib/tabasco.coffee:14:19)

Commands

     -0:21.3.0 core:move-to-top (atom-text-editor.editor.is-focused)
     -0:20.9.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
     -0:20.6.0 core:select-to-bottom (atom-text-editor.editor.is-focused)
     -0:20 core:copy (atom-text-editor.editor.is-focused)
     -0:19.8.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:19.3.0 core:paste (atom-text-editor.editor.is-focused)
  2x -0:19 core:move-up (atom-text-editor.editor.is-focused)
     -0:18.4.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -0:18.1.0 editor:delete-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -0:16.4.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:16.4.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:16.2.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:15.9.0 editor:delete-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -0:14.7.0 core:save (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:10.4.0 core:close (atom-text-editor.editor.is-focused)
     -0:09.8.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "audioBeep": false,
    "destroyEmptyPanes": false,
    "disabledPackages": [
      "minimap-symbols",
      "preview-tabs",
      "crosshairs",
      "coffee-compile",
      "enhanced-package-list",
      "themed-settings",
      "smart-tag-cycle",
      "tree-view-open-files",
      "linter-js-standard"
    ],
    "themes": [
      "one-dark-ui",
      "spacegray-dark-syntax"
    ]
  }
}

Installed Packages

# User
Stylus, v3.0.0
bezier-curve-editor, v0.7.2
block-travel, v1.0.4
caniuse, v0.9.0
clipboard-plus, v0.5.1
docblockr, v0.7.3
figlet, v0.5.3
highlight-selected, v0.11.2
language-generic-config, v1.0.0
language-haml, v0.24.0
language-jade, v0.7.1
language-sass, v0.46.0
linter, v1.11.4
minimap, v4.21.0
minimap-bookmarks, v0.3.0
minimap-codeglance, v0.4.5
minimap-find-and-replace, v4.5.0
minimap-git-diff, v4.2.0
minimap-highlight-selected, v4.4.0
minimap-linter, v1.1.1
minimap-pigments, v0.2.0
minimap-selection, v4.4.0
php-twig, v4.0.0
pigments, v0.26.0
process-palette, v0.8.1
project-palette-finder, v2.4.17
red-wavy-underline, v0.3.0
spacegray-dark-syntax, v0.2.0
tabasco, v0.3.0
tablr, v1.1.1
tabs-to-spaces, v1.0.2
toggle-quotes, v1.0.0
travis-ci-status, v1.0.0
tree-view-breadcrumb, v0.8.1
typewriter, v0.3.5
unfancy-file-icons, v0.5.0
white-cursor, v0.6.0
zentabs, v0.8.7

# Dev
bezier-curve-editor, v0.7.2
figlet, v0.5.3
minimap, v4.21.0
minimap-bookmarks, v0.3.0
minimap-find-and-replace, v4.5.0
minimap-git-diff, v4.2.0
minimap-highlight-selected, v4.4.0
minimap-pigments, v0.2.0
minimap-selection, v4.4.0
pigments, v0.26.0
tablr, v1.1.1
tree-view-breadcrumb, v0.8.1
unfancy-file-icons, v0.5.0

Thanks. You were right. It does happen when there's an empty pane. I actually wasn't aware that it was possible to have tabs alongside empty panes.

I've fixed the issue in v0.3.1. I've only made it so that you can drop a tab on top of an empty pane. For some reason I couldn't get docking to an empty pane to work, but I'll look into this later.