Browse Source

Improved search esc behaviour

master
Igor Zhukov 10 years ago
parent
commit
749c45b9af
  1. 4
      app/js/directives.js

4
app/js/directives.js

@ -220,6 +220,7 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -220,6 +220,7 @@ angular.module('myApp.directives', ['myApp.filters'])
scrollableWrap = $('.im_dialogs_scrollable_wrap', element)[0],
searchField = $('.im_dialogs_search_field', element)[0],
panelWrap = $('.im_dialogs_panel', element)[0],
searchClear = $('.im_dialogs_search_clear', element)[0],
tabsWrap = $('.im_dialogs_tabs_wrap', element)[0],
searchFocused = false;
@ -283,6 +284,9 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -283,6 +284,9 @@ angular.module('myApp.directives', ['myApp.filters'])
searchField.select();
}
}
else if (searchField.value) {
$(searchClear).trigger('click');
}
return cancelEvent(e);
}

Loading…
Cancel
Save