fix(StatusChatInput): don't insert control characters
@mentions have a special `onRelease()` key handler that makes sure a space is inserted around the mention when needed. Fix the `onRelease()` handler to prevent control or otherwise unprintable characters being inserted as text. Fixes: #7685
This commit is contained in:
parent
9eb515e3e3
commit
9cb850f67f
|
@ -678,6 +678,9 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onRelease(event) {
|
function onRelease(event) {
|
||||||
|
if ((event.modifiers & Qt.ControlModifier) || (event.modifiers & Qt.MetaModifier)) // these are likely shortcuts with no meaningful text
|
||||||
|
return
|
||||||
|
|
||||||
if (event.key === Qt.Key_Backspace && textFormatMenu.opened) {
|
if (event.key === Qt.Key_Backspace && textFormatMenu.opened) {
|
||||||
textFormatMenu.close()
|
textFormatMenu.close()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue