|
@@ -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); |
|
|