From 278a6f5b416693ed2dbeb13b6cc1fb0dafc9d391 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Sun, 24 Feb 2013 18:13:25 -0500 Subject: [PATCH] update oldDisplayName value on displayName change This patch fixes a bug that can be reproduced in following way: 1. change displayName 2. clear text in displayName input click change again Then you will get an error and previous displayName will be restored. Expected behavior should restore the new updated displayName. --- settings/js/personal.js | 1 + 1 file changed, 1 insertion(+) diff --git a/settings/js/personal.js b/settings/js/personal.js index c5a46a16002..8747c496041 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -42,6 +42,7 @@ $(document).ready(function(){ $.post( 'ajax/changedisplayname.php', post, function(data){ if( data.status == "success" ){ $('#displaynamechanged').show(); + $('#oldDisplayName').val($('#displayName').val()); // update displayName on the top right expand button str_parts = $('#expand').html().split('\t'); str_parts[5] = $('#displayName').val(); -- 2.39.5