mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-16 18:07:11 -05:00
Solve bad name reference error
This commit is contained in:
parent
f975f340a4
commit
b38c944484
@ -55,11 +55,11 @@ Rectangle {
|
|||||||
//checks if the previous character is an Emoji and adds a ' ' if that's the case
|
//checks if the previous character is an Emoji and adds a ' ' if that's the case
|
||||||
//this is necessary, because Emoji use a bigger font-size, and that font-size is kept using without a ' '
|
//this is necessary, because Emoji use a bigger font-size, and that font-size is kept using without a ' '
|
||||||
function keyPressedHandler(event) {
|
function keyPressedHandler(event) {
|
||||||
var testStr = txtIn.getText(txtIn.length-2, txtIn.length)
|
var testStr = textArea.getText(textArea.length-2, textArea.length)
|
||||||
var ptrn = new RegExp("[\uD800-\uDBFF][\uDC00-\uDFFF]")
|
var ptrn = new RegExp("[\uD800-\uDBFF][\uDC00-\uDFFF]")
|
||||||
if ((event.key !== Qt.Key_Backspace) && (ptrn.test(testStr))) {
|
if ((event.key !== Qt.Key_Backspace) && (ptrn.test(testStr))) {
|
||||||
txtIn.text += " "
|
textArea.text += " "
|
||||||
txtIn.cursorPosition = txtIn.length
|
textArea.cursorPosition = textArea.length
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user