← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~huwshimi/launchpad/tag-dialogue-457856 into lp:launchpad

 

Huw Wilkins has proposed merging lp:~huwshimi/launchpad/tag-dialogue-457856 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #457856 Tag dialog never closes
  https://bugs.launchpad.net/bugs/457856

For more details, see:
https://code.launchpad.net/~huwshimi/launchpad/tag-dialogue-457856/+merge/48868

Added manual close to tag dialogue if it is still open when tags are saved.

This fix checks to see if the dialogue is open at the point you save the tags, and if so it closes the dialogue.

TO TEST:
View a bug. Find the list of tags and click edit. Partially type in the name of a tag so that the autosuggest dialogue is visible. While the dialogue is still visible save the list of tags (click the tick button). The dialogue should close.
-- 
https://code.launchpad.net/~huwshimi/launchpad/tag-dialogue-457856/+merge/48868
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~huwshimi/launchpad/tag-dialogue-457856 into lp:launchpad.
=== modified file 'lib/lp/bugs/javascript/bug_tags_entry.js'
--- lib/lp/bugs/javascript/bug_tags_entry.js	2010-07-11 00:32:53 +0000
+++ lib/lp/bugs/javascript/bug_tags_entry.js	2011-02-08 03:30:00 +0000
@@ -195,6 +195,11 @@
     ok_button.on('click', function(e) {
         e.halt();
         save_tags();
+        /* Check to see if the autocomplete dialogue is still open
+           and if so, close it. */
+        if (!autocomplete._last_input_was_completed) {
+            autocomplete.hide();
+        }
     });
 
     tag_input.on('keydown', function(e) {