Просмотр исходного кода

fix: password input not resetting bug, add resetPasswordInput() method

9401adarsh 2 лет назад
Родитель
Сommit
372fb58d20
1 измененных файлов с 13 добавлено и 0 удалено
  1. 13 0
      js/privatebin.js

+ 13 - 0
js/privatebin.js

@@ -3767,6 +3767,18 @@ jQuery.PrivateBin = (function($, RawDeflate) {
             }
         }
 
+        /**
+         * Clear the password input in the top navigation
+         * 
+         * @name TopNav.clearPasswordInput
+         * @function
+         */
+
+        function clearPasswordInput()
+        {
+            $passwordInput.val('');
+        }
+
 
         /**
          * Clear the attachment input in the top navigation.
@@ -4349,6 +4361,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
         me.resetInput = function()
         {
             clearAttachmentInput();
+            clearPasswordInput();
             $burnAfterReading.prop('checked', burnAfterReadingDefault);
             $openDiscussion.prop('checked', openDiscussionDefault);
             if (openDiscussionDefault || !burnAfterReadingDefault) $openDiscussionOption.removeClass('buttondisabled');