Skip to content

Commit

Permalink
Minor bugfix - "currentSplitter not set" when clicking handle on a FI…
Browse files Browse the repository at this point in the history
…XED splitter.
  • Loading branch information
Hilton Janfield committed Oct 8, 2015
1 parent 7751873 commit 848e048
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/jquery.enhsplitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,14 @@

.on('mousedown.splitter', '.splitter_handle', function (e) {
e.preventDefault();
if (currentSplitter == null) {
if (currentSplitter === null) {
$(this).closest('.splitter_bar').trigger('mousedown');
}

dragStartPosition = (currentSplitter.settings.vertical) ? e.pageX : e.pageY;
// Two separate comparisons on purpose. .trigger() may or may not set currentSplitter.
if (currentSplitter !== null) {
dragStartPosition = (currentSplitter.settings.vertical) ? e.pageX : e.pageY;
}
})

.on('mousedown.splitter touchstart.splitter', '.splitter_container > .splitter_bar', function (e) {
Expand Down

0 comments on commit 848e048

Please sign in to comment.