mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-02-10 18:05:32 +08:00
Merge pull request 'feature/trim-font-rev1' (#912) from feature/trim-font-rev1 into develop
This commit is contained in:
@ -483,9 +483,14 @@ define([
|
||||
this._isMouseDownMenu = false; return;
|
||||
}
|
||||
|
||||
var val = $(e.target).val(),
|
||||
var val = $(e.target).val().trim(),
|
||||
record = {};
|
||||
|
||||
if(val != $(e.target).val()){
|
||||
$(e.target).val(val);
|
||||
this.selectCandidate(true);
|
||||
}
|
||||
|
||||
if (this.lastValue === val && !(extra && extra.reapply)) {
|
||||
if (extra && extra.onkeydown)
|
||||
this.trigger('combo:blur', this, e);
|
||||
|
||||
@ -1470,7 +1470,7 @@ define([
|
||||
|
||||
if (!item || isNaN(Common.Utils.String.parseFloat(record.value))) {
|
||||
me._state.type_fontsize = 'number';
|
||||
value = /^\+?(\d*(\.|,)?\d+)$|^\+?(\d+(\.|,)?\d*)$/.exec(record.value);
|
||||
value = /^\+?(\d*(\.|,)?\d+)$|^\+?(\d+(\.|,)?\d*)$/.exec(record.value.trim());
|
||||
|
||||
if (!value) {
|
||||
value = this._getApiTextSize();
|
||||
|
||||
@ -2304,7 +2304,7 @@ define([
|
||||
});
|
||||
|
||||
if (!item) {
|
||||
value = /^\+?(\d*(\.|,).?\d+)$|^\+?(\d+(\.|,)?\d*)$/.exec(record.value);
|
||||
value = /^\+?(\d*(\.|,).?\d+)$|^\+?(\d+(\.|,)?\d*)$/.exec(record.value.trim());
|
||||
|
||||
if (!value) {
|
||||
value = this._getApiTextSize();
|
||||
|
||||
@ -1511,7 +1511,7 @@ define([
|
||||
});
|
||||
|
||||
if (!item) {
|
||||
value = /^\+?(\d*(\.|,).?\d+)$|^\+?(\d+(\.|,)?\d*)$/.exec(record.value);
|
||||
value = /^\+?(\d*(\.|,).?\d+)$|^\+?(\d+(\.|,)?\d*)$/.exec(record.value.trim());
|
||||
|
||||
if (!value) {
|
||||
value = this._getApiTextSize();
|
||||
|
||||
@ -1790,7 +1790,7 @@ define([
|
||||
});
|
||||
|
||||
if (!item) {
|
||||
value = /^\+?(\d*(\.|,)?\d+)$|^\+?(\d+(\.|,)?\d*)$/.exec(record.value);
|
||||
value = /^\+?(\d*(\.|,)?\d+)$|^\+?(\d+(\.|,)?\d*)$/.exec(record.value.trim());
|
||||
|
||||
if (!value) {
|
||||
value = this._getApiTextSize();
|
||||
|
||||
Reference in New Issue
Block a user