Skip to content

Commit

Permalink
Fixed problem with "." in input helper. (#2652)
Browse files Browse the repository at this point in the history
* Fixed problem with "." in input helper.

* Replaced "charCode" to "event.key" and "event.code"
  • Loading branch information
AlexeyMatveev686 committed Apr 4, 2022
1 parent a7eaed9 commit 27b1ea8
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions common/text_input.js
Original file line number Diff line number Diff line change
Expand Up @@ -1237,16 +1237,18 @@

var ret = this.Api.onKeyPress(e);

switch (e.which)
{
case 46: // delete
if (e.key === "Delete" || e.code === "Delete") {
switch (e.which)
{
AscCommon.stopEvent(e);
this.clear();
return false;
case 46: // delete
{
AscCommon.stopEvent(e);
this.clear();
return false;
}
default:
break;
}
default:
break;
}

this.keyPressInput += String.fromCharCode(e.which);
Expand Down

0 comments on commit 27b1ea8

Please sign in to comment.