UPDATE
The expected behaviour (threaded view) sometimes works, sometimes not.
If it doesn’t I can see an error in the DevTools, which then disappears and the page is scrolled down automatically to the bottom.
Error:
Uncaught TypeError: Cannot read property ‘scrollHeight’ of null
at Object.scrollToForm (reply.min.js?ver=2.6.4:3)
at Object.moveForm (reply.min.js?ver=2.6.4:3)
at HTMLAnchorElement.onclick (VM852:1182)
scrollToForm @ reply.min.js?ver=2.6.4:3
moveForm @ reply.min.js?ver=2.6.4:3
onclick @ VM852:1182
I realised meanwhile that the reply form opens where it should (i.e. right under the reply in want to write a reply to) when I click a second time on REPLY.
Very inconvenient.
Apparently this is a known bug for at least three months:
https://bbpress.trac.wordpress.org/ticket/3327
I’ve just released version 4.4.3 of my style pack plugin, which has a new tab called ‘bug fixes’ where I have added @mjonesnerdery ‘s very useful correction
bbp style pack
once activated go to
dashboard>settings>bbp style pack>bug fixes and activate it.
@mjonesnerdery and @hoch to fix this issue add this function in the theme functions.php file
// Add adminbar blank div to fix BBPRESS jQuery issue
function add_admin_bar_div() {
echo '<div id="wpadminbar" style="display:none;"></div>';
}
add_action('wp_footer', 'add_admin_bar_div',15);
Thanks @mudit-kumawat. I would add this, as admin users will still show the admin bar, so with your code we will have two divs with the same id:
// Add adminbar blank div to fix BBPRESS jQuery issue
function add_admin_bar_div() {
if( is_bbpress() && ! current_user_can('administrator') ){
echo '<div id="wpadminbar" style="display:none;"></div>';
}
}
add_action('wp_footer', 'add_admin_bar_div',15);
@david
Thanx for the help mate!!! It really works for me.
@frendeliko Admin bars were not being shown on my website, so you gave this code without adding conditions. Thanks for adding conditions in my code 🙂
Thank you so much!! We have been wrestling with this issue for months now and this fixed it!