Переглянути джерело

revert: removal of flt on focus event

version-14
Mohammad Hasnain 3 роки тому
джерело
коміт
21a4331be4
1 змінених файлів з 11 додано та 0 видалено
  1. +11
    -0
      frappe/public/js/frappe/form/controls/int.js

+ 11
- 0
frappe/public/js/frappe/form/controls/int.js Переглянути файл

@@ -8,6 +8,17 @@ frappe.ui.form.ControlInt = class ControlInt extends frappe.ui.form.ControlData
make_input () { make_input () {
var me = this; var me = this;
super.make_input(); super.make_input();
this.$input
// .addClass("text-right")
.on("focus", function () {
setTimeout(function () {
if (!document.activeElement) return;
document.activeElement.value
= me.validate(document.activeElement.value);
document.activeElement.select();
}, 100);
return false;
});
} }
validate (value) { validate (value) {
return this.parse(value); return this.parse(value);


Завантаження…
Відмінити
Зберегти