Skip to content

Commit

Permalink
Update jss.editor.textlocale.js
Browse files Browse the repository at this point in the history
  • Loading branch information
GBonnaire committed Dec 6, 2021
1 parent 91caa0f commit d18f5c9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions editors/text/jss.editor.textlocale.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Custom editor for textLocal
*
* @version 1.0.1
* @version 1.0.2
* @author Guillaume Bonnaire <contact@gbonnaire.fr>
* @website https://www.gbonnaire.fr
* @example
Expand Down Expand Up @@ -36,14 +36,17 @@
if (cell) {
var v = methods.parseValue(x, y, value, instance, options);
cell.innerText = v;
if(_isNumber(v)) {
return _getValueNumber(v);
if(_isNumber(value)) {
return _getValueNumber(value);
}
}
}

methods.openEditor = function(cell, value, x, y, instance, options) {
editor = instance.parent.input;
if(typeof value == "number") {
value = _getValueProcessed(value, options);
}
editor.innerText = value;
editor.focus();
}
Expand Down

0 comments on commit d18f5c9

Please sign in to comment.