|
@@ -110,11 +110,17 @@ LocalVideo.prototype.setDisplayName = function(displayName) {
|
110
|
110
|
$('#localVideoContainer .displayname')
|
111
|
111
|
.bind("click", function (e) {
|
112
|
112
|
let $editDisplayName = $('#editDisplayName');
|
113
|
|
- let $localDisplayName = $('#localDisplayName');
|
114
|
113
|
|
115
|
114
|
e.preventDefault();
|
116
|
115
|
e.stopPropagation();
|
117
|
|
- UIUtil.setVisibility($localDisplayName, false);
|
|
116
|
+ // we set display to be hidden
|
|
117
|
+ self.hideDisplayName = true;
|
|
118
|
+ // update the small video vide to hide the display name
|
|
119
|
+ self.updateView();
|
|
120
|
+ // disables further updates in the thumbnail to stay in the
|
|
121
|
+ // edit mode
|
|
122
|
+ self.disableUpdateView = true;
|
|
123
|
+
|
118
|
124
|
$editDisplayName.show();
|
119
|
125
|
$editDisplayName.focus();
|
120
|
126
|
$editDisplayName.select();
|
|
@@ -122,7 +128,11 @@ LocalVideo.prototype.setDisplayName = function(displayName) {
|
122
|
128
|
$editDisplayName.one("focusout", function () {
|
123
|
129
|
self.emitter.emit(UIEvents.NICKNAME_CHANGED, this.value);
|
124
|
130
|
$editDisplayName.hide();
|
125
|
|
- UIUtil.setVisibility($localDisplayName, true);
|
|
131
|
+ // stop editing, display displayName and resume updating
|
|
132
|
+ // the thumbnail
|
|
133
|
+ self.hideDisplayName = false;
|
|
134
|
+ self.disableUpdateView = false;
|
|
135
|
+ self.updateView();
|
126
|
136
|
});
|
127
|
137
|
|
128
|
138
|
$editDisplayName.on('keydown', function (e) {
|