fix: Remove scrolling on focusout event for touchscreen devices

This commit is contained in:
Rucha Mahabal 2020-11-06 13:52:44 +05:30
parent ca78636992
commit 59c5437af7
2 changed files with 0 additions and 13 deletions

View file

@ -133,18 +133,6 @@ frappe.ui.form.ControlInput = frappe.ui.form.Control.extend({
me.parse_validate_and_set_in_model(me.get_input_value(), e);
});
},
bind_focusout: function() {
// on touchscreen devices, scroll to top
// so that static navbar and page head don't overlap the input
if (frappe.dom.is_touchscreen()) {
var me = this;
this.$input && this.$input.on("focusout", function() {
if (frappe.dom.is_touchscreen()) {
frappe.utils.scroll_to(me.$wrapper);
}
});
}
},
set_label: function(label) {
if(label) this.df.label = label;

View file

@ -21,7 +21,6 @@ frappe.ui.form.ControlData = frappe.ui.form.ControlInput.extend({
this.input = this.$input.get(0);
this.has_input = true;
this.bind_change_event();
this.bind_focusout();
this.setup_autoname_check();
if (this.df.options == 'Phone') {
this.setup_phone();