Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX Don't trigger detail view in tree mode when first loaded (Left…

…AndMain.Content.js), limit to actual user clicks
  • Loading branch information...
commit a3bd21b48ecbdf7d3f872af38cfd9fdd701d1db4 1 parent a1b8698
Ingo Schommer chillu authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 admin/javascript/LeftAndMain.Content.js
9 admin/javascript/LeftAndMain.Content.js
View
@@ -43,8 +43,13 @@
var self = this;
// Listen to tree selection events
- $('.cms-tree').bind('select_node.jstree', function(e, data) {
- var node = data.rslt.obj, loadedNodeID = self.find(':input[name=ID]').val()
+ this.find('.cms-tree').bind('select_node.jstree', function(e, data) {
+ var node = data.rslt.obj, loadedNodeID = self.find(':input[name=ID]').val(), origEvent = data.args[2];
+
+ // Don't trigger unless coming from a click event.
+ // Avoids problems with automated section switches from tree to detail view
+ // when JSTree auto-selects elements on first load.
+ if(!origEvent) return false;
// Don't allow checking disabled nodes
if($(node).hasClass('disabled')) return false;
Please sign in to comment.
Something went wrong with that request. Please try again.