mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-02-21 00:23:02 +08:00
Fix curly brace output
This commit is contained in:
parent
02fd2223ff
commit
4f5af90d8d
@ -47,7 +47,7 @@ class Utilities {
|
||||
}
|
||||
|
||||
getButtonClass = button => {
|
||||
let buttonTypeClass = (button.includes("{") && button !== '{//}') ? "functionBtn" : "standardBtn";
|
||||
let buttonTypeClass = (button.includes("{") && button.includes("}") && button !== '{//}') ? "functionBtn" : "standardBtn";
|
||||
let buttonWithoutBraces = button.replace("{", "").replace("}", "");
|
||||
|
||||
let buttonNormalized =
|
||||
@ -167,6 +167,9 @@ class Utilities {
|
||||
else if(button === "{numpaddecimal}")
|
||||
output = this.addStringAt(output, '.', caretPos);
|
||||
|
||||
else if(button === "{" || button === "}")
|
||||
output = this.addStringAt(output, button, caretPos);
|
||||
|
||||
else if(!button.includes("{") && !button.includes("}"))
|
||||
output = this.addStringAt(output, button, caretPos);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user