mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-26 04:07:56 -05:00
Merge pull request #184 from Slayer95/tab-complete
Support tab-complete in PMs if there is no side room
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user