Bug 872494 - Remove buggy fadeIn/fadeOut from the "add a comment" popup; r=mbrubeck
authorEd Morley <emorley@mozilla.com>
Fri, 17 May 2013 12:40:19 +0100
changeset 1079 8041618055980da4b3ee53c4ca0996f37d80b143
parent 1078 4f68d73e1dcef3a7f29a435fbf8c1f3a0cca6457
child 1080 b5d2cea23db813cfd97d61dc237020fe8ffb4f2b
push id641
push useremorley@mozilla.com
push dateFri, 17 May 2013 11:40:47 +0000
reviewersmbrubeck
bugs872494
Bug 872494 - Remove buggy fadeIn/fadeOut from the "add a comment" popup; r=mbrubeck
js/AddCommentUI.js
js/UserInterface.js
--- a/js/AddCommentUI.js
+++ b/js/AddCommentUI.js
@@ -41,20 +41,19 @@ var AddCommentUI = {
         if (rev)
           UserInterface._toggleSelectedRev(rev, true);
       }
       return false;
     });
 
     $("#addNoteForm").bind("submit", function addNoteFormSubmit() {
       self.submit();
-      $("#addNotePopup").fadeOut('fast', function afterAddNotePopupFadeOutAfterSubmit() {
-        self.reset();
-        UserInterface._markSelected();
-      });
+      $("#addNotePopup").hide();
+      self.reset();
+      UserInterface._markSelected();
       return false;
     });
 
     $("#logNoteText").bind("keyup", function logNoteTextKeypress(e) {
       // Control+Enter submits the form
       if (e.which == 13 && (e.ctrlKey || e.metaKey)) {
         $("#addNoteForm").submit();
         return false;
@@ -117,17 +116,17 @@ var AddCommentUI = {
       });
       this.pendingBugsChanged(1);
     }
     this.clearAutoStarBugs();
     this.reset();
   },
 
   openCommentBox: function AddCommentUI_openCommentBox() {
-    $("#addNotePopup").fadeIn('fast');
+    $("#addNotePopup").show();
     if (UserInterface._activeResult)
       UserInterface.setBuildSelected(UserInterface._activeResult, true);
     var focusTextfield = ($("#logNoteEmail").val() ? $("#logNoteText") : $("#logNoteEmail")).get(0);
     focusTextfield.focus();
     focusTextfield.select();
     this.updateUI();
   },
 
--- a/js/UserInterface.js
+++ b/js/UserInterface.js
@@ -521,20 +521,19 @@ var UserInterface = {
     });
   },
 
   _toggleOnlyUnstarred: function UserInterface__toggleOnlyUnstarred() {
     this._setOnlyUnstarred(!this._onlyUnstarred);
   },
 
   closePopup: function UserInterface__closePopup(popup) {
-    $(popup).fadeOut('fast', function afterFadeOut() {
-      if ('afterCloseCallback' in this)
-        this.afterCloseCallback();
-    });
+    $(popup).hide();
+    if ('afterCloseCallback' in this)
+      this.afterCloseCallback();
   },
 
   // Close all dropdowns and popups
   _closeAllPopupUI: function UserInterface__closeAllPopupUI() {
     $('.dropdown').removeClass('open');
     this.closePopup($('.popupForm:visible'));
   },