Kaynağa Gözat

Merge pull request #1201 from rmehta/autocomplete-focus

[fix] autocomplete: do not select on hover
version-14
Anand Doshi 10 yıl önce
ebeveyn
işleme
3fa666467b
3 değiştirilmiş dosya ile 3 ekleme ve 5 silme
  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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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({
});
}
});


Yükleniyor…
İptal
Kaydet