fix: Fixing broken binding on text input enabled property

The enabled property of the text input needs to have a binding to the StatusChatInput enabled property

+ re-enable the squish test
This commit is contained in:
Alex Jbanca 2023-11-02 14:17:03 +02:00 committed by Alex Jbanca
parent 8cf2c3047b
commit 81fd27526e
2 changed files with 6 additions and 8 deletions

View File

@ -59,8 +59,7 @@ Feature: Status Desktop community messages
When the user unpins the message at index 0
Then the amount of pinned messages is 1
@mayfail
# https://github.com/status-im/status-desktop/issues/12440
Scenario Outline: The user can reply to own message
Given the user sends a chat message "<message>"
When the user replies to community chat message at index 0 with "<reply>"

View File

@ -121,14 +121,9 @@ Rectangle {
}
function setText(text) {
const textInputEnabled = textInput.enabled
if(textInputEnabled) {
textInput.enabled = false
}
textInput.clear()
hyperlinksFormatter.undoStackManager.clear()
textInput.append(text)
textInput.enabled = textInputEnabled
}
implicitWidth: layout.implicitWidth + layout.anchors.leftMargin + layout.anchors.rightMargin
@ -1250,6 +1245,10 @@ Rectangle {
bottomPadding: 9
leftPadding: 0
padding: 0
// This is needed to make sure the text area is disabled when the input is disabled
Binding on enabled {
value: root.enabled
}
Keys.onUpPressed: {
if (isEdit && !activeFocus) {
forceActiveFocus();