projects
/
KiwiIRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72ee1b6
)
Focus control input on switching tabs
author
Darren
<darren@darrenwhitlen.com>
Sun, 30 Mar 2014 12:03:20 +0000
(13:03 +0100)
committer
Darren
<darren@darrenwhitlen.com>
Sun, 30 Mar 2014 12:03:20 +0000
(13:03 +0100)
client/src/views/controlbox.js
patch
|
blob
|
blame
|
history
diff --git
a/client/src/views/controlbox.js
b/client/src/views/controlbox.js
index 8fb5cb2c08ab668e4f27b688bcca12333a650d36..dbe30ac3e30c28000f113c264a75729b75b8f91f 100644
(file)
--- a/
client/src/views/controlbox.js
+++ b/
client/src/views/controlbox.js
@@
-29,6
+29,13
@@
_kiwi.view.ControlBox = Backbone.View.extend({
_kiwi.app.connections.on('active', function(panel, connection) {
$('.nick', that.$el).text(connection.get('nick'));
});
+
+ // Keep focus on the input box as we flick between panels
+ _kiwi.app.panels.bind('active', function (active_panel) {
+ if (active_panel.isChannel() || active_panel.isServer() || active_panel.isQuery()) {
+ that.$('.inp').focus();
+ }
+ });
},
showNickChange: function (ev) {