[JS] Fix few errors around AFSpecial_Keystroke

- @cincodenada found some errors which are fixed in this patch;
 - it partially fixes issue #14306;
 - add some tests.
This commit is contained in:
Calixte Denizet 2022-01-08 00:11:40 +01:00
parent 290cbc5232
commit 6369617e6f
3 changed files with 185 additions and 16 deletions

View file

@ -26,8 +26,8 @@ class Event {
this.richChange = data.richChange || [];
this.richChangeEx = data.richChangeEx || [];
this.richValue = data.richValue || [];
this.selEnd = data.selEnd || -1;
this.selStart = data.selStart || -1;
this.selEnd = data.selEnd ?? -1;
this.selStart = data.selStart ?? -1;
this.shift = data.shift || false;
this.source = data.source || null;
this.target = data.target || null;