Prevent focusing readOnly field/areas on click

This commit is contained in:
miruka 2020-11-05 21:16:52 -04:00
parent 74ffbdb0a8
commit 32484c3ae5
2 changed files with 2 additions and 0 deletions

View File

@ -64,6 +64,7 @@ TextArea {
text: defaultText || "" text: defaultText || ""
opacity: enabled ? 1 : theme.disabledElementsOpacity opacity: enabled ? 1 : theme.disabledElementsOpacity
selectByMouse: true selectByMouse: true
activeFocusOnPress: ! readOnly
leftPadding: theme.spacing leftPadding: theme.spacing
rightPadding: leftPadding rightPadding: leftPadding
topPadding: theme.spacing / 1.5 topPadding: theme.spacing / 1.5

View File

@ -52,6 +52,7 @@ TextField {
text: defaultText || "" text: defaultText || ""
opacity: enabled ? 1 : theme.disabledElementsOpacity opacity: enabled ? 1 : theme.disabledElementsOpacity
selectByMouse: true selectByMouse: true
activeFocusOnPress: ! readOnly
leftPadding: theme.spacing leftPadding: theme.spacing
rightPadding: leftPadding rightPadding: leftPadding
topPadding: theme.spacing / 1.5 topPadding: theme.spacing / 1.5