Skip to content

Commit

Permalink
Fix regression where List doesn't remember the previously focused Lis…
Browse files Browse the repository at this point in the history
…tItem.

Fixes #680, refs ibm-js/delite#462.
  • Loading branch information
wkeese authored and brunano21 committed Dec 7, 2016
1 parent 0db5319 commit ce7dd6e
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions list/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,7 @@ define([
},

/**
* @method
* Handle keydown events
* Handle keydown events.
* @private
*/
_keynavKeyDownHandler: dcl.before(function (evt) {
Expand Down Expand Up @@ -1027,15 +1026,14 @@ define([
}
},

/**
* @method
* Called on "delite-deactivated" event, stores a reference to the focused child.
* @private
*/
_keynavDeactivatedHandler: dcl.superCall(function (sup) {
return function () {
this._previousFocusedChild = this.navigatedDescendant;
sup.call(this);
focusoutHandler: dcl.superCall(function (sup) {
return function (evt) {
// When focus moves outside of the List, save reference to previously focused child.
if (!this.contains(evt.relatedTarget)) {
this._previousFocusedChild = this.navigatedDescendant;
}

sup.apply(this, arguments);
};
}),

Expand Down

0 comments on commit ce7dd6e

Please sign in to comment.