- VSCode Version: Code 1.10.2 (8076a19, 2017-03-08T14:02:52.799Z)
- OS Version: Windows_NT ia32 10.0.14393
- Extensions:
| Extension |
Author |
Version |
| cpptools |
ms-vscode |
0.9.2 |
Steps to Reproduce:
- paste this emoji: π©βπ©βπ§βπ§
- hit backspace
Expected: deletes entire emoji (like it does in this html form).
Result: deletes the right kid, leaving you with π©βπ©βπ§β.
I've had this same bug in my own code once. It's because javascript has derpy non-utf-8 strings. Single utf-8 characters will be multiple javascript string characters. I don't know the correct terminology, but just play with it and see what I mean. I found the correct way to delete character off javascript strings to be:
var chars = Array.from(text);
chars.pop();
text = chars.join('');
Steps to Reproduce:
Expected: deletes entire emoji (like it does in this html form).
Result: deletes the right kid, leaving you with π©βπ©βπ§β.
I've had this same bug in my own code once. It's because javascript has derpy non-utf-8 strings. Single utf-8 characters will be multiple javascript string characters. I don't know the correct terminology, but just play with it and see what I mean. I found the correct way to delete character off javascript strings to be: