diff --git a/UI/Templates/ContactsUI/UIxContactsFilterPanel.wox b/UI/Templates/ContactsUI/UIxContactsFilterPanel.wox
index 8f771deda..4c8b24427 100644
--- a/UI/Templates/ContactsUI/UIxContactsFilterPanel.wox
+++ b/UI/Templates/ContactsUI/UIxContactsFilterPanel.wox
@@ -13,7 +13,7 @@
-
+
31)) {
+
+ if (!div.clean) {
var oldD = $("d");
if (oldD) {
oldD.remove();
@@ -226,8 +232,10 @@ function onFolderSearchKeyDown(event) {
}
div.clean = true;
$("addButton").disabled = true;
- startAnimation($("pageContent"), $("filterPanel"));
}
+
+ if (this.timer)
+ startAnimation($("pageContent"), $("filterPanel"));
}
function initUserFoldersWindow() {
diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js
index d1523957f..1caf9f477 100644
--- a/UI/WebServerResources/generic.js
+++ b/UI/WebServerResources/generic.js
@@ -985,7 +985,7 @@ function onSearchFocus() {
}
function onSearchBlur(event) {
- if (!this.value || this.value.strip().length == 0) {
+ if (!this.value || this.value.blank()) {
this.setAttribute("modified", "");
this.setStyle({ color: "#aaa" });
this.value = this.ghostPhrase;
@@ -1007,12 +1007,15 @@ function onSearchKeyDown(event) {
if (this.timer)
clearTimeout(this.timer);
- if (event.keyCode == 13) {
+ if (event.ctrlKey || event.metaKey)
+ return;
+ else if (event.keyCode == Event.KEY_RETURN) {
onSearchFormSubmit();
preventDefault(event);
}
- else if (event.keyCode == 8
- || event.keyCode >31)
+ else if (event.keyCode == 0
+ || event.keyCode == Event.KEY_BACKSPACE
+ || event.keyCode > 31)
this.timer = setTimeout("onSearchFormSubmit()", 1000);
}