fix(@desktop/statusq): Fix StatusBaseInput marked dirty in case of
rich text if visual input is empty Fixes #8599
This commit is contained in:
parent
bfdd9092e1
commit
b901f32dd8
|
@ -368,10 +368,15 @@ Item {
|
|||
onCursorRectangleChanged: Utils.ensureVisible(flick, cursorRectangle)
|
||||
onActiveFocusChanged: if (root.pristine) root.pristine = false
|
||||
onTextChanged: {
|
||||
if (previousText === text) {
|
||||
if (previousText === text || (previousText == "" && length == 0 && length != text.length)) {
|
||||
// Not sure why, but the textChanged event was triggered even if it didn't really
|
||||
|
||||
// Avoid further processing on initial condition when previousText is empty
|
||||
// but text is set to default rich text, as it will mark input dirty and
|
||||
// trigger validation, with likely not valid state
|
||||
return
|
||||
}
|
||||
|
||||
root.dirty = true
|
||||
if (root.maximumLength > 0) {
|
||||
let utf8Length = Utils.encodeUtf8(text).length
|
||||
|
|
Loading…
Reference in New Issue