var locInputTimeout = null;
var input = document.getElementById('inputTxt');
input.onkeyup = function(e){
clearTimeout(locInputTimeout);
locInputTimeout = setTimeout(function(){initAutocomplete()},2000);
};
function initAutocomplete() {
var autocomplete = new google.maps.places.A
我正在为CKEditor 3.6对话框文本输入框添加一个自动补全功能。问题是用Enter键从列表中选择一个值是不可能的,因为它会关闭对话框,并且阻止所有Enter键事件在dom上冒泡。我可以在_source/plugins/dialog/plugin.js中看到:
// ESC, ENTER
var preventKeyBubblingKeys = { 27 :1, 13 :1 };
var preventKeyBubbling = function( e )
{
if ( e.data.getKeystroke() in prevent