From 3cfdee76235f7113d69290cf1ddaad5563340bfd Mon Sep 17 00:00:00 2001 From: Phillip Lang Martinez Date: Wed, 7 Dec 2022 15:19:54 -0500 Subject: [PATCH 1/2] bugfix chat editor 100% --- qortal-ui-plugins/plugins/core/components/ChatTextEditor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js b/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js index b2a16f89..e7a2c8d0 100644 --- a/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js +++ b/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js @@ -523,6 +523,7 @@ class ChatTextEditor extends LitElement { word-break: break-word; outline: none; min-height: 20px; + width: 100%; } div[contentEditable=true]:empty:before { @@ -537,6 +538,7 @@ class ChatTextEditor extends LitElement { div[contentEditable=false]{ background: rgba(0,0,0,0.1); + width: 100%; } img.emoji { From 6e4e171257c696fce66c35628dfd5572bc924842 Mon Sep 17 00:00:00 2001 From: Phillip Lang Martinez Date: Thu, 8 Dec 2022 20:19:37 -0500 Subject: [PATCH 2/2] remove logs --- .../plugins/core/components/ChatTextEditor.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js b/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js index e7a2c8d0..6bd01d0c 100644 --- a/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js +++ b/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js @@ -330,7 +330,6 @@ class ChatTextEditor extends LitElement { } async updated(changedProperties) { - console.log({changedProperties}); if (changedProperties && changedProperties.has('editedMessageObj')) { if (this.editedMessageObj) { this.chatEditor.insertText(this.editedMessageObj.message); @@ -344,14 +343,8 @@ class ChatTextEditor extends LitElement { const captionEditor = this.shadowRoot.getElementById(this.iframeId).contentWindow.document.getElementById('chatbarId'); captionEditor.setAttribute('data-placeholder', this.placeholder); } - if (changedProperties && changedProperties.has("chatMessageSize")) { - console.log(this.chatMessageSize, "chat message size"); - } - if (changedProperties && changedProperties.has("iframeHeight")) { - console.log(this.iframeHeight, "iframe height"); - } + if (changedProperties && changedProperties.has("imageFile")) { - console.log(this.imageFile, "imageFile"); this.chatMessageInput = "newChat"; } } @@ -372,7 +365,6 @@ class ChatTextEditor extends LitElement { } getMessageSize(message){ - console.log("super12"); try { const messageText = message; // Format and Sanitize Message @@ -691,7 +683,6 @@ class ChatTextEditor extends LitElement { if (e.type === 'keydown') { await new Promise((res, rej) => { setTimeout(() => { - console.log(editorConfig.editableElement.contentDocument.body.querySelector("#chatbarId").innerHTML, "here 18"); editorConfig.calculateIFrameHeight(editorConfig.editableElement.contentDocument.body.scrollHeight); editorConfig.getMessageSize(editorConfig.editableElement.contentDocument.body.querySelector("#chatbarId").innerHTML); }, 0);