fix #1124: keyboard navigation issues

This commit is contained in:
antelle 2019-03-02 17:14:38 +01:00
parent bcd627663b
commit ce527f4af5
2 changed files with 9 additions and 0 deletions

View File

@ -150,6 +150,8 @@ const OpenView = Backbone.View.extend({
KeyHandler.offKey(Keys.DOM_VK_TAB, this.tabKeyPress, this);
KeyHandler.offKey(Keys.DOM_VK_ENTER, this.enterKeyPress, this);
KeyHandler.offKey(Keys.DOM_VK_RETURN, this.enterKeyPress, this);
KeyHandler.offKey(Keys.DOM_VK_DOWN, this.moveOpenFileSelectionDown, this);
KeyHandler.offKey(Keys.DOM_VK_UP, this.moveOpenFileSelectionUp, this);
Backbone.View.prototype.remove.apply(this, arguments);
},
@ -830,6 +832,10 @@ const OpenView = Backbone.View.extend({
this.currentSelectedIndex = this.currentSelectedIndex + steps;
}
const lastOpenFile = lastOpenFiles[this.currentSelectedIndex];
if (!lastOpenFile) {
return;
}
const fileInfo = this.model.fileInfos.get(lastOpenFiles[this.currentSelectedIndex].id);
this.showOpenFileInfo(fileInfo);

View File

@ -1,5 +1,8 @@
Release notes
-------------
##### v1.7.8 (2019-03-02)
`-` fix #1124: keyboard navigation issues
##### v1.7.7 (2019-02-09)
`-` another attempt to fix focus issues