From 372fb58d203025677ade16d1ae4e9d9fc66c1b92 Mon Sep 17 00:00:00 2001 From: 9401adarsh Date: Wed, 29 May 2024 16:20:28 +0530 Subject: [PATCH] fix: password input not resetting bug, add resetPasswordInput() method --- js/privatebin.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/js/privatebin.js b/js/privatebin.js index 33a4494e..53b9b8bc 100644 --- a/js/privatebin.js +++ b/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');