fix scroll for iframe (that will be also included on 1.6.5)

User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

fix scroll for iframe (that will be also included on 1.6.5)

Post by axew3 »

i'm just over for a while preparing next coming 1.6.5 release, that will resolve also the scroll to top for iframe on all phpBB links onclick events:

open page-forum.php (or whatever you named it)

search for:

Code: Select all

 if (w3all_pass_login_out == true) {
    window.location.replace('".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/'); 
   }
immediately after add this:

Code: Select all

   var w3all_kk  = (w3all_passed_url.indexOf('viewtopic.php') > -1);
   if (w3all_kk == false) {
    window.scrollTo(0, 200);
  }
The page forum will be updated with the above code, and will remove all others calls to:

Code: Select all

window.scrollTo(0, 200);
Adding the above code without removing others calls to window.scrollTo, should return same result, so if like to resolve before 1.6.5, just add this in the while to your page-forum.php-

It has already been added into this running install.
Finally, i've discover it is more easy to remove the scroll behavior for events where it need to not fire, that are only few, instead the contrary!
Goofkop
User www
User www
Posts: 63
Joined: Sun Feb 26, 2017 8:33 am

Re: fix scroll for iframe (that will be also included on 1.6.5)

Post by Goofkop »

I just wait for the update. Great work, really like your plugin.
Post Reply