preventing default on keydown when in the tree