瀏覽代碼

[fix] autocomplete: do not select on hover

version-14
Rushabh Mehta 10 年之前
父節點
當前提交
d630b340f0
共有 3 個文件被更改,包括 3 次插入5 次删除
  1. +1
    -0
      frappe/public/js/frappe/form/control.js
  2. +1
    -2
      frappe/public/js/frappe/ui/filters/filters.js
  3. +1
    -3
      frappe/public/js/frappe/views/communication.js

+ 1
- 0
frappe/public/js/frappe/form/control.js 查看文件

@@ -1091,6 +1091,7 @@ frappe.ui.form.ControlLink = frappe.ui.form.ControlData.extend({
me.autocomplete_open = false;
},
focus: function( event, ui ) {
event.preventDefault();
if(ui.item.action) {
return false;
}


+ 1
- 2
frappe/public/js/frappe/ui/filters/filters.js 查看文件

@@ -402,8 +402,7 @@ frappe.ui.FieldSelect = Class.extend({
minLength: 0,
autoFocus: true,
focus: function(event, ui) {
ui.item && me.$select.val(ui.item.label);
return false;
event.preventDefault();
},
select: function(event, ui) {
me.selected_doctype = ui.item.doctype;


+ 1
- 3
frappe/public/js/frappe/views/communication.js 查看文件

@@ -426,8 +426,7 @@ frappe.views.CommunicationComposer = Class.extend({
},
appendTo: this.dialog.$wrapper,
focus: function() {
// prevent value inserted on focus
return false;
event.preventDefault();
},
select: function( event, ui ) {
var terms = split( this.value );
@@ -443,4 +442,3 @@ frappe.views.CommunicationComposer = Class.extend({
});
}
});


Loading…
取消
儲存