Replace every backslash after user finished typing

This commit is contained in:
Arne Keller 2021-03-03 21:43:38 +01:00
parent 19a2921cbc
commit cde13db5b1

View File

@ -67,7 +67,7 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver {
+ "if (area.value.indexOf('\\\\') >= 0) {" + "if (area.value.indexOf('\\\\') >= 0) {"
+ " var start = area.selectionStart;" + " var start = area.selectionStart;"
+ " var end = area.selectionEnd;" + " var end = area.selectionEnd;"
+ " area.value = area.value.replace('\\\\', 'λ');" + " area.value = area.value.replaceAll('\\\\', 'λ');"
+ " area.selectionStart = start;" + " area.selectionStart = start;"
+ " area.selectionEnd = end;" + " area.selectionEnd = end;"
+ "}});"); + "}});");