aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-05-23 11:46:41 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-05-28 14:37:11 +0100
commit475809c40225901bfa363690a1a3ae4740548684 (patch)
treec752a2451ff09b1ba4d665f3b66b9e866640e80a /web/js
parent4b3a05395eb18dc6c58be124445ea40f33502e05 (diff)
Do not focus on title on duplicate list removal.
Sometimes this can be a long way down, if e.g. extra Open311 questions above.
Diffstat (limited to 'web/js')
-rw-r--r--web/js/duplicates.js17
1 files changed, 3 insertions, 14 deletions
diff --git a/web/js/duplicates.js b/web/js/duplicates.js
index 723c357e9..ff1f0bd47 100644
--- a/web/js/duplicates.js
+++ b/web/js/duplicates.js
@@ -127,23 +127,14 @@
current_duplicate_markers = markers;
}
- function remove_duplicate_list(cb) {
- var animations = [];
-
- animations.push( $.Deferred() );
+ function remove_duplicate_list() {
$('#js-duplicate-reports').slideUp(function(){
$(this).addClass('hidden');
$(this).find('ul').empty();
- animations[0].resolve();
});
if ( $('#problem_form').length ) {
- animations.push( $.Deferred() );
- $('.js-hide-if-invalid-category').slideDown(function(){
- animations[1].resolve();
- });
+ $('.js-hide-if-invalid-category').slideDown();
}
-
- $.when.apply(this, animations).then(cb);
}
function remove_duplicate_pins() {
@@ -180,9 +171,7 @@
$('.js-hide-duplicate-suggestions').on('click', function(e){
e.preventDefault();
remove_duplicate_pins();
- remove_duplicate_list(function(){
- $('#form_title').focus();
- });
+ remove_duplicate_list();
});
})();