Merge pull request #27043 from blaggacao/fix/input-mode-numbers

fix: input mode for numbers
This commit is contained in:
Akhil Narang 2024-07-10 15:25:37 +05:30 committed by GitHub
commit 2e003a6b0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -7,10 +7,11 @@ frappe.ui.form.ControlData = class ControlData extends frappe.ui.form.ControlInp
make_input() {
if (this.$input) return;
let { html_element, input_type } = this.constructor;
let { html_element, input_type, input_mode } = this.constructor;
this.$input = $("<" + html_element + ">")
.attr("type", input_type)
.attr("inputmode", input_mode)
.attr("autocomplete", "off")
.addClass("input-with-feedback form-control")
.prependTo(this.input_area);

View file

@ -1,5 +1,6 @@
frappe.ui.form.ControlInt = class ControlInt extends frappe.ui.form.ControlData {
static trigger_change_on_input_event = false;
static input_mode = "numeric";
make() {
super.make();
}