Browse Source

Fix comments JS

spaghetti 8 years ago
parent
commit
80ba3a76c6
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      design/views/generic/reply/quickreply.php
  2. 1
    1
      static/functions/comments.js

+ 1
- 1
design/views/generic/reply/quickreply.php View File

@@ -99,7 +99,7 @@
99 99
           <form class="send_form center" name="reply" id="quickpostform" <?=isset($Action)?'action="'.$Action.'"':''?> method="post"<? if (!check_perms('users_mod')) { ?> onsubmit="quickpostform.submit_button.disabled = true;"<? } ?> <? if (!G::$LoggedUser['DisableAutoSave']) { ?>data-autosave-text="quickpost"<? } ?>>
100 100
             <input type="hidden" name="action" value="<?=$InputAction?>" />
101 101
             <input type="hidden" name="auth" value="<?=G::$LoggedUser['AuthKey']?>" />
102
-            <input type="hidden" name="<?=$InputName?>" value="<?=$InputID?>" />
102
+            <input type="hidden" name="<?=$InputName?>" data-autosave-id="<?=$InputID?>" value="<?=$InputID?>" />
103 103
             <div id="quickreplytext">
104 104
 <?
105 105
               echo $ReplyText->getBuffer();

+ 1
- 1
static/functions/comments.js View File

@@ -430,5 +430,5 @@ document.querySelectorAll('[data-quote-jump]').forEach(function(el) {
430 430
 
431 431
 if ($('[data-autosave-text]').raw()) {
432 432
   var el = $('[data-autosave-text]').raw()
433
-  var storedTempTextarea = new StoreText(el.attributes['data-autosave-text'].value, el.id, $('[data-autosave-text] > [name="thread"]').raw().attributes['value'].value);
433
+  var storedTempTextarea = new StoreText(el.attributes['data-autosave-text'].value, el.id, $('[data-autosave-id]').raw().attributes['value'].value);
434 434
 }

Loading…
Cancel
Save