Disable page scroll on image lightbox

Posted in: Newspaper
Post count: 44

I would like to disable the page scrolling that happens when lightbox images are clicked. I would like the page to remain at the position of the image that was clicked, even if more images have td-modal-image.

Post count: 20685

Hi,

There is no option to do that. That is how it is supposed to work. It would require modifications to the theme js files and it may not be so easy.

Thanks

Post count: 44

It doesn’t have to be easy, I just need to know what to look for. It was possible in Newspaper 4. Any help would be much appreciated.

Post count: 7909

Hi,

Try to remove this code from js file – https://www.screencast.com/t/wQXLMCkjSYM5

Thanks!

Post count: 44

The code was a bit different in the minified js but that’s it, thanks!
Can I also safely take out the preceding comma?

Post count: 22421

Hello,
Yes, remove the final comma.
Thanks.

Post count: 44

With the latest version of tagdiv_theme.min.js the section mentioned above is no longer there. Can you give me any clue where I can find the modal images part in the javascript.

I really dislike the page scrolling in the background when viewing modal images…

Post count: 35449

Hi,

Please try on this path wp-content/themes/Newspaper/js/tagdiv_theme.min.js -> https://www.screencast.com/t/45fUVLlQPlVE
Also if you made the update to Newspaper v9.7 please make sure that you do not overwrite the theme files, because then you will encounter some problems.

Also please check the topic about the Newspaper update v9.7 -> https://forum.tagdiv.com/topic/important-new-update-newspaper-9-7/

Thank you!

Post count: 44

I know where the file is, that’s not the problem.
The js is completely different from a previous version (9.6x) though, so I can’t find the procedure where it handles modal images in articles, and the background scrolling that comes with it.

//popup on modal images in articles
jQuery( ‘article’ ).magnificPopup({
type: ‘image’,
delegate: “.td-modal-image”,
gallery: { …. etc.

Do you have any idea what part of the code now triggers the modal image in articles so scroll to the image anchor in the background while the lightbox is active?

Post count: 35449

Hi,

For modal images you can check this path wp-content/plugins/td-composer/legacy/common/wp_booster/js_dev/tdModalPostImages.js -> https://www.screencast.com/t/xDKit46c4OFF

Hope this will help you!
Thanks.

Post count: 44

That’s it, many thanks!

Viewing 11 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic.