浏览代码

Merge pull request #1201 from rmehta/autocomplete-focus

[fix] autocomplete: do not select on hover
version-14
Anand Doshi 10 年前
父节点
当前提交
3fa666467b
共有 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; me.autocomplete_open = false;
}, },
focus: function( event, ui ) { focus: function( event, ui ) {
event.preventDefault();
if(ui.item.action) { if(ui.item.action) {
return false; return false;
} }


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

@@ -402,8 +402,7 @@ frappe.ui.FieldSelect = Class.extend({
minLength: 0, minLength: 0,
autoFocus: true, autoFocus: true,
focus: function(event, ui) { focus: function(event, ui) {
ui.item && me.$select.val(ui.item.label);
return false;
event.preventDefault();
}, },
select: function(event, ui) { select: function(event, ui) {
me.selected_doctype = ui.item.doctype; 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, appendTo: this.dialog.$wrapper,
focus: function() { focus: function() {
// prevent value inserted on focus
return false;
event.preventDefault();
}, },
select: function( event, ui ) { select: function( event, ui ) {
var terms = split( this.value ); var terms = split( this.value );
@@ -443,4 +442,3 @@ frappe.views.CommunicationComposer = Class.extend({
}); });
} }
}); });


正在加载...
取消
保存