Skip to content

Commit

Permalink
Fix(NewMessage): adjust items dir based on the selected language. It'…
Browse files Browse the repository at this point in the history
…s temporary until we find a way to fix the emoji picker on selected language and not on user's language (new text message)

Signed-off-by: Dorra Jaouad <dorra.jaoued7@gmail.com>
  • Loading branch information
DorraJaouad committed Jan 27, 2025
1 parent 49a4e66 commit c90e20b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/NewMessage/NewMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
@update-new-file-dialog="updateNewFileDialog" />

<!-- Input area -->
<div class="new-message-form__input">
<div class="new-message-form__input" :dir="dir">
<NewMessageAbsenceInfo v-if="!dialog && userAbsence"
:user-absence="userAbsence"
:display-name="conversation.displayName" />
Expand Down Expand Up @@ -80,7 +80,7 @@
:menu-container="containerElement"
:placeholder="placeholderText"
:aria-label="placeholderText"
dir="auto"
:dir="text ? 'auto' : undefined"
@keydown.esc="handleInputEsc"
@keydown.ctrl.up="handleEditLastMessage"
@keydown.meta.up="handleEditLastMessage"
Expand Down Expand Up @@ -309,6 +309,7 @@ export default {
data() {
return {
text: '',
dir: undefined,
silentChat: false,
// True when the audio recorder component is recording
isRecordingAudio: false,
Expand Down Expand Up @@ -500,6 +501,13 @@ export default {
},

text(newValue) {
if (newValue) {
this.$nextTick(() => {
this.dir = window.getComputedStyle(this.$refs.richContenteditable.$refs.contenteditable).direction
})
} else {
this.dir = undefined
}
if (this.currentUploadId && !this.upload) {
return
} else if (this.dialog && this.broadcast) {
Expand Down

0 comments on commit c90e20b

Please sign in to comment.