fix: remove delay from numeric field selection (#23759)
This commit is contained in:
parent
957f9a01b5
commit
119a4bdbc1
1 changed files with 4 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue