[FIX] web_editor: consider negative values in the left panel

A negative value, even if legit, was not understood by the editor and
induced empty inputs in the left panel.

closes odoo/odoo#44683

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2020-02-05 21:39:22 +00:00
parent ecc068762e
commit 1e576ee899
@@ -102,7 +102,7 @@ function _convertNumericToUnit(value, unitFrom, unitTo, cssProp, $target) {
* @returns {Array|null}
*/
function _getNumericAndUnit(value) {
const m = value.trim().match(/^([0-9.]+)(\w*)$/);
const m = value.trim().match(/^(-?[0-9.]+)(\w*)$/);
if (!m) {
return null;
}