fix: remove delay from numeric field selection (#23759)

This commit is contained in:
Ankush Menat 2023-12-13 16:16:27 +05:30 committed by GitHub
parent 957f9a01b5
commit 119a4bdbc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,21 +2,13 @@ frappe.ui.form.ControlInt = class ControlInt extends frappe.ui.form.ControlData
static trigger_change_on_input_event = false;
make() {
super.make();
// $(this.label_area).addClass('pull-right');
// $(this.disp_area).addClass('text-right');
}
make_input() {
var me = this;
super.make_input();
this.$input
// .addClass("text-right")
.on("focus", function () {
setTimeout(function () {
if (!document.activeElement) return;
document.activeElement.select();
}, 100);
return false;
});
this.$input.on("focus", () => {
document.activeElement?.select?.();
return false;
});
}
validate(value) {
return this.parse(value);