From e19f1cd23ea7e1babcf2c36e93f6061eff074ce8 Mon Sep 17 00:00:00 2001 From: "Cathy J. Fitzpatrick" Date: Fri, 24 May 2013 23:40:25 -0600 Subject: [PATCH] Select previous name on the /nick dialogue --- js/client.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/client.js b/js/client.js index 6c95c1eb4..34168a982 100644 --- a/js/client.js +++ b/js/client.js @@ -1824,6 +1824,12 @@ submit: function(data) { this.close(); app.user.rename(data.username); + }, + domInitialize: function() { + var $input = this.$('input[name=username]'); + if ('setSelectionRange' in $input[0]) { + $input[0].setSelectionRange(0, $input.val().length); + } } });