Browse Source

fix: 火狐浏览器下表情位置的bug

master
xsx 4 months ago
parent
commit
0851efc99c
  1. 6
      im-web/src/components/chat/ChatInput.vue

6
im-web/src/components/chat/ChatInput.vue

@ -46,7 +46,7 @@ export default {
range.deleteContents();
}
//
if (txt && typeof(txt) == 'string') {
if (txt && typeof (txt) == 'string') {
let textNode = document.createTextNode(txt);
range.insertNode(textNode)
range.collapse();
@ -236,7 +236,7 @@ export default {
},
onBlur(e) {
if (!this.atIng) {
this.updateRange();
//this.updateRange();
}
},
onMousedown() {
@ -268,7 +268,6 @@ export default {
blurRange.collapse()
this.selectElement(textNode);
this.updateRange();
this.isEmpty = false;
},
generateId() {
@ -475,6 +474,7 @@ export default {
font-size: var(--im-font-size);
text-align: left;
overflow-y: auto;
white-space: pre-wrap;
// bug
>div:before {

Loading…
Cancel
Save