Merge pull request #11888 from ruchamahabal/fix-scrolling

fix: Remove scrolling on focusout event for touchscreen devices
This commit is contained in:
mergify[bot] 2020-11-06 09:53:09 +00:00 committed by GitHub
commit 368f9a86f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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();