Skip to content

Commit

Permalink
Support tab-complete in PMs if there is no side room
Browse files Browse the repository at this point in the history
  • Loading branch information
Slayer95 committed May 9, 2014
1 parent 81514be commit 006bb46
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion js/client-mainmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,15 @@
} else if (e.keyCode === 27) { // Esc
this.closePM(e);
} else if (e.keyCode === 9 && !e.shiftKey && !e.ctrlKey) { // Tab key
if (app.curSideRoom && app.curSideRoom.handleTabComplete && app.curSideRoom.handleTabComplete($(e.currentTarget))) {
var handlerRoom = app.curSideRoom;
if (!handlerRoom) {
for (var roomid in app.rooms) {
if (!app.rooms[roomid].handleTabComplete) continue;
handlerRoom = app.rooms[roomid];
break;
}
}
if (handlerRoom && handlerRoom.handleTabComplete && handlerRoom.handleTabComplete($(e.currentTarget))) {
e.preventDefault();
e.stopPropagation();
}
Expand Down

0 comments on commit 006bb46

Please sign in to comment.