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

Merge pull request #1548 from Ribas160/hide_comment_reply_button_on_click

Hide Reply button in the discussions once clicked to avoid losing the…
El RIDO 1 год назад
Родитель
Сommit
6ff08b6884
3 измененных файлов с 9 добавлено и 1 удалено
  1. 1 0
      CHANGELOG.md
  2. 7 0
      js/privatebin.js
  3. 1 1
      lib/Configuration.php

+ 1 - 0
CHANGELOG.md

@@ -5,6 +5,7 @@
 * CHANGED: Passing large data structures by reference to reduce memory consumption (#858)
 * CHANGED: Passing large data structures by reference to reduce memory consumption (#858)
 * CHANGED: Removed use of ctype functions and polyfill library for ctype
 * CHANGED: Removed use of ctype functions and polyfill library for ctype
 * CHANGED: Upgrading libraries to: DOMpurify 3.2.5, ip-lib 1.20.0
 * CHANGED: Upgrading libraries to: DOMpurify 3.2.5, ip-lib 1.20.0
+* FIXED: Hide Reply button in the discussions once clicked to avoid losing the text input (#1508)
 
 
 ## 1.7.6 (2025-02-01)
 ## 1.7.6 (2025-02-01)
 * ADDED: Ability to copy the paste by clicking the copy icon button or using the keyboard shortcut ctrl+c/cmd+c (#1390 & #12)
 * ADDED: Ability to copy the paste by clicking the copy icon button or using the keyboard shortcut ctrl+c/cmd+c (#1390 & #12)

+ 7 - 0
js/privatebin.js

@@ -3477,6 +3477,12 @@ jQuery.PrivateBin = (function($, RawDeflate) {
         {
         {
             const $source = $(event.target);
             const $source = $(event.target);
 
 
+            // show all reply buttons
+            $commentContainer.find('button').removeClass('hidden');
+
+            // hide the current reply button
+            $source.addClass('hidden');
+
             // clear input
             // clear input
             $replyMessage.val('');
             $replyMessage.val('');
             $replyNickname.val('');
             $replyNickname.val('');
@@ -5410,6 +5416,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
         me.run = function(paste)
         me.run = function(paste)
         {
         {
             Alert.hideMessages();
             Alert.hideMessages();
+            Alert.setCustomHandler(null);
             Alert.showLoading('Decrypting paste…', 'cloud-download');
             Alert.showLoading('Decrypting paste…', 'cloud-download');
 
 
             if (typeof paste === 'undefined' || paste.type === 'click') {
             if (typeof paste === 'undefined' || paste.type === 'click') {

+ 1 - 1
lib/Configuration.php

@@ -119,7 +119,7 @@ class Configuration
             'js/kjua-0.9.0.js'       => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==',
             'js/kjua-0.9.0.js'       => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==',
             'js/legacy.js'           => 'sha512-UxW/TOZKon83n6dk/09GsYKIyeO5LeBHokxyIq+r7KFS5KMBeIB/EM7NrkVYIezwZBaovnyNtY2d9tKFicRlXg==',
             'js/legacy.js'           => 'sha512-UxW/TOZKon83n6dk/09GsYKIyeO5LeBHokxyIq+r7KFS5KMBeIB/EM7NrkVYIezwZBaovnyNtY2d9tKFicRlXg==',
             'js/prettify.js'         => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==',
             'js/prettify.js'         => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==',
-            'js/privatebin.js'       => 'sha512-yN0ZaVFrXpiYaeFRcofdCrlHVcw4ZJAXU3K1l6H9rsoY//iLKegX0GdWxRCFWzhd1xO4eDJKCT7qyaA1Vt65bg==',
+            'js/privatebin.js'       => 'sha512-QkOUM8rg4MI60YRwHqWmayBzCdf/e3XnbHtrX17h2nn0EcyOQNhtSq8a0dXR1hoQFHFfF+9PiT73nZ6qoogjQA==',
             'js/purify-3.2.5.js'     => 'sha512-eLlLLL/zYuf5JuG0x4WQm687MToqOGP9cDQHIdmOy1ZpjiY4J48BBcOM7DtZheKk1UogW920+9RslWYB4KGuuA==',
             'js/purify-3.2.5.js'     => 'sha512-eLlLLL/zYuf5JuG0x4WQm687MToqOGP9cDQHIdmOy1ZpjiY4J48BBcOM7DtZheKk1UogW920+9RslWYB4KGuuA==',
             'js/rawinflate-0.3.js'   => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==',
             'js/rawinflate-0.3.js'   => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==',
             'js/showdown-2.1.0.js'   => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==',
             'js/showdown-2.1.0.js'   => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==',