Skip to content

Commit

Permalink
fix: Remove scrolling on focusout event for touchscreen devices
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchamahabal committed Nov 6, 2020
1 parent ca78636 commit 59c5437
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
12 changes: 0 additions & 12 deletions frappe/public/js/frappe/form/controls/base_input.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion frappe/public/js/frappe/form/controls/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 59c5437

Please sign in to comment.