浏览代码

Fixes displayname on remote video on FF. Seems innerText is not working on FF, replace it with innerHTML.

j8
damencho 9 年前
父节点
当前提交
aed2d97c10
共有 2 个文件被更改,包括 4 次插入6 次删除
  1. 2
    2
      modules/UI/side_pannels/contactlist/ContactList.js
  2. 2
    4
      modules/UI/videolayout/RemoteVideo.js

+ 2
- 2
modules/UI/side_pannels/contactlist/ContactList.js 查看文件

@@ -46,10 +46,10 @@ function createAvatar(jid) {
46 46
 function createDisplayNameParagraph(key, displayName) {
47 47
     let p = document.createElement('p');
48 48
     if (displayName) {
49
-        p.innerText = displayName;
49
+        p.innerHTML = displayName;
50 50
     } else if(key) {
51 51
         p.setAttribute("data-i18n",key);
52
-        p.innerText = APP.translation.translateString(key);
52
+        p.innerHTML = APP.translation.translateString(key);
53 53
     }
54 54
 
55 55
     return p;

+ 2
- 4
modules/UI/videolayout/RemoteVideo.js 查看文件

@@ -404,13 +404,11 @@ RemoteVideo.prototype.setDisplayName = function(displayName, key) {
404 404
         nameSpan.className = 'displayname';
405 405
         $('#' + this.videoSpanId)[0].appendChild(nameSpan);
406 406
 
407
-
408 407
         if (displayName && displayName.length > 0) {
409
-            nameSpan.innerText = displayName;
408
+            nameSpan.innerHTML = displayName;
410 409
         }
411 410
         else
412
-            nameSpan.innerText = interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME;
413
-
411
+            nameSpan.innerHTML = interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME;
414 412
         nameSpan.id = this.videoSpanId + '_name';
415 413
     }
416 414
 };

正在加载...
取消
保存