Skip to content

Commit

Permalink
Keyboard focus not working when using dnd extension
Browse files Browse the repository at this point in the history
Update #270
  • Loading branch information
mar10 committed Apr 18, 2015
1 parent a2c6b54 commit ef775d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* [Improved] #417 only raise exception about data being a string if dataType is "json"
* [Fixed] #402, #405 rare exception in dnd events
* [Fixed] #420 nodeSetActive not returning promise
* [Fixed] #270 Keyboard focus not working when using dnd extension

# 2.8.1 / 2015-03-01
* [Improved] generateFormElements() new argument `opts`, default: `{stopOnParents: true}`
Expand Down
3 changes: 2 additions & 1 deletion src/jquery.fancytree.dnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ $.ui.fancytree.registerExtension({
// issue #270: draggable eats mousedown events
if( tree.options.dnd.dragStart ){
tree.$container.on("mousedown", function(event){
if( !tree.hasFocus() && ctx.options.dnd.focusOnClick ) {
// if( !tree.hasFocus() && ctx.options.dnd.focusOnClick ) {
if( ctx.options.dnd.focusOnClick ) { // #270
var node = $.ui.fancytree.getNode(event);
if (node){
node.debug("Re-enable focus that was prevented by jQuery UI draggable.");
Expand Down

0 comments on commit ef775d1

Please sign in to comment.