Fixed bug with event default prevention.

pull/1513/head
Richard 10 years ago
parent b1f30b1cc6
commit 4ae1854066
  1. 11
      app/assets/javascripts/angular/directives/components/selectable-title-directive.js

@ -183,27 +183,32 @@ angular.module('openproject.uiComponents')
} }
} }
angular.element('#title-filter').bind('click', function(event) { function preventDefault(event) {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
}
angular.element('#title-filter').bind('click', function(event) {
preventDefault(event);
}); });
scope.handleSelection = function(event) { scope.handleSelection = function(event) {
switch(event.which) { switch(event.which) {
case KEY_CODES.enter: case KEY_CODES.enter:
performSelect(); performSelect();
preventDefault(event);
break; break;
case KEY_CODES.down: case KEY_CODES.down:
selectNext(); selectNext();
preventDefault(event);
break; break;
case KEY_CODES.up: case KEY_CODES.up:
selectPrevious(); selectPrevious();
preventDefault(event);
break; break;
default: default:
break; break;
} }
event.preventDefault();
event.stopPropagation();
}; };
scope.reload = function(modelId, newTitle) { scope.reload = function(modelId, newTitle) {

Loading…
Cancel
Save