Thomas Bruederli
2014-06-24 dfc9d7f20955c4d722b78f47a2a07d89592ed9a4
Mute clicks on virtual treelist item links (they need tabindex=0 in order to be focusable by keyboard though)
1 files modified
10 ■■■■■ changed files
program/js/treelist.js 10 ●●●●● patch | view | raw | blame | history
program/js/treelist.js
@@ -116,6 +116,16 @@
    }
  });
  // mute clicks on virtual folder links (they need tabindex="0" in order to be selectable by keyboard)
  container.on('mousedown', 'a', function(e) {
    var link = $(e.target), node = indexbyid[dom2id(link.closest('li'))];
    if (node && node.virtual && !link.attr('href')) {
      e.preventDefault();
      e.stopPropagation();
      return false;
    }
  });
  // activate search function
  if (p.searchbox) {
    searchfield = $(p.searchbox).on('keyup', function(e) {