make "scrollto" work again on mod_display after mid changes

This commit is contained in:
Mike Macgirvin 2022-07-24 03:31:38 -07:00
parent 84c6d4cab4
commit 8dc6b8cce1
2 changed files with 2 additions and 5 deletions

View file

@ -508,7 +508,7 @@ class ThreadItem
'previewing' => ($conv->is_preview() ? true : false ),
'preview_lbl' => t('This is an unsaved preview'),
'wait' => t('Please wait'),
'submid' => str_replace(['+','='], ['',''], base64_encode($item['mid'])),
'submid' => str_replace(['+','='], ['',''], base64_encode(urlencode($item['mid']))),
'thread_level' => $thread_level,
'indentpx' => intval(get_pconfig(local_channel(), 'system', 'thread_indent_px', get_config('system', 'thread_indent_px', 0))),
'thread_max' => intval(get_config('system', 'thread_maxlevel', 20)) + 1

View file

@ -791,9 +791,6 @@ function updateConvItems(mode,data) {
if($('#collapsed-comments-'+itmId).is(':visible'))
isVisible = true;
// insert the content according to the mode and first_page
// and whether or not the content exists already (overwrite it)
@ -914,7 +911,7 @@ function updateConvItems(mode,data) {
let encoded = ((submid.substr(0,4) == 'b64.') ? true : false);
let submid_encoded = ((encoded) ? submid.substr(4) : window.btoa(submid));
submid_encoded = submid_encoded.replace(/[\+\=]/g,'');
submid_encoded = submid_encoded.replace(/[\+\=]/g,'');
if($('.item_' + submid_encoded).length && !$('.item_' + submid_encoded).hasClass('toplevel_item') && mode == 'replace') {
if($('.collapsed-comments').length) {
let scrolltoid = $('.collapsed-comments').attr('id').substring(19);