Home › Forums › WoodMart support forum › Background scrolling in the responsive devices
Background scrolling in the responsive devices
- This topic has 18 replies, 2 voices, and was last updated 1 year, 7 months ago by
Elise Noromit.
-
AuthorPosts
-
September 28, 2023 at 12:53 pm #499915
spnutrateaParticipantThe body in the background should be fixed if the toggle menu, off canvas menu, popup view or mini cart widget is visible. Could you please let us know any java script for such or does theme setting have such option.
September 28, 2023 at 3:55 pm #499993
Elise NoromitMemberHello,
Please add this code to the Theme Settings > Custom CSS > Global:
html:has(.wd-side-hidden.wd-opened) { overflow: hidden; }
Please check how it works.
Best Regards
September 28, 2023 at 4:16 pm #500003
spnutrateaParticipantUnfortunately, the above code did not work. I have attached the screen recording.
Attachments:
You must be logged in to view attached files.September 28, 2023 at 7:36 pm #500041
Elise NoromitMemberHello,
We have checked and we see no scroll on mobile devices in your site: https://monosnap.com/file/NKUZxBja7vbH5mQS9TWFdbeK7DFsIa
The mobile devices usually do not have any scroll by their nature. The content is swapped there with the sliding sidebar.
If you have any questions please feel free to contact us.
Best Regards
September 29, 2023 at 11:56 am #500187
spnutrateaParticipantHi Elise,
I have checked the website in iPhone and Samsung Galaxy S20 Ultra. Still I can see the background scroll is happening. Mobile devices have tap features that let users swipe from top to bottom.
For your convenience, I have created a video by using Firefox to look into vividly. That is exactly happening when an user click quick view/Mini Cart or Off canvas menu.
I look forward to hearing from you.
Kind regards,
SatyaAttachments:
You must be logged in to view attached files.October 2, 2023 at 4:03 pm #500879
Elise NoromitMemberHello,
Sorry for the delay.
Please add this code to the Theme Settings > Custom JS > on Document ready:
var closeSide = document.querySelector('.wd-close-side'); if ( closeSide && window.innerWidth < 768 ) { var observer = new MutationObserver((changes) => { if(changes[0].attributeName.includes('class')) { if(closeSide.classList.contains('wd-close-side-opened')) { document.querySelector('html').style.setProperty('overflow-y', 'hidden') } else if(! closeSide.classList.contains('wd-close-side-opened')) { document.querySelector('html').style.removeProperty('overflow-y') } } }); observer.observe(closeSide, {attributes : true}); }
Best Regards
October 2, 2023 at 5:22 pm #500933
spnutrateaParticipantThank you Elise, I will upload the script and get back to you as soon as I can.
October 2, 2023 at 11:11 pm #500964
Elise NoromitMemberHello,
Sure!
If you have any questions please feel free to contact us.
Best Regards
October 3, 2023 at 1:16 pm #501093
spnutrateaParticipantOctober 3, 2023 at 1:28 pm #501099
Elise NoromitMemberHello,
Have you already tested?
Best Regards
October 3, 2023 at 2:16 pm #501128
spnutrateaParticipantAfter implementing the above script Canvas mobile menu and Mini Cart Widget does not have background scrolling. However, when we click the eye icon (QuickView), background scrolling is there.
October 4, 2023 at 1:44 pm #501535
Elise NoromitMemberHello,
Please add this code to the Theme Settings > Custom CSS > Global:
@media (max-width: 1024px) { .mfp-wrap.quick-view-wrapper { position: fixed !important; overflow-y: scroll; max-height: 100vh !important; top: 0 !important; bottom: 0 !important; } }
Please add this code to the Theme Settings > Custom JS on Document ready:
(function($) { $(document).on('wdQuickViewOpen', function() { $.magnificPopup.instance.st.callbacks.close = function() { document.querySelector('html').style.removeProperty('overflow-y') } document.querySelector('html').style.setProperty('overflow-y', 'hidden') }); })(jQuery);
Best Regards
October 4, 2023 at 2:39 pm #501550
spnutrateaParticipantI have implemented new style and script as mentioned above. The old scripts has been removed from Theme Settings > Custom JS on Document ready:. Please advice.
Regards
SPOctober 5, 2023 at 12:02 pm #501807
Elise NoromitMemberHello,
You need to add all the code to the Theme Settings > Custom JS > On Document ready.
If you have any questions please feel free to contact us.
Best Regards
October 5, 2023 at 12:17 pm #501817
spnutrateaParticipantHi Elise,
Thank you for your guidance. Could you please verify the below said code is correct?Theme Settings > Custom JS > On Document ready:
(function($) {
$(document).on(‘wdQuickViewOpen’, function() {
$.magnificPopup.instance.st.callbacks.close = function() {
document.querySelector(‘html’).style.removeProperty(‘overflow-y’)
}document.querySelector(‘html’).style.setProperty(‘overflow-y’, ‘hidden’)
});
})(jQuery);var closeSide = document.querySelector(‘.wd-close-side’);
if ( closeSide && window.innerWidth < 768 ) {
var observer = new MutationObserver((changes) => {
if(changes[0].attributeName.includes(‘class’)) {
if(closeSide.classList.contains(‘wd-close-side-opened’)) {
document.querySelector(‘html’).style.setProperty(‘overflow-y’, ‘hidden’)
} else if(! closeSide.classList.contains(‘wd-close-side-opened’)) {
document.querySelector(‘html’).style.removeProperty(‘overflow-y’)
}
}
});
observer.observe(closeSide, {attributes : true});
}Theme Settings > Custom CSS > Global:
@media (max-width: 1024px) {.mfp-wrap.quick-view-wrapper {
position: fixed !important;
overflow-y: scroll;
max-height: 100vh !important;
top: 0 !important;
bottom: 0 !important;
}
}Regards,
SPOctober 5, 2023 at 1:14 pm #501858
spnutrateaParticipantHi Elise
I have an another serious issue, I believe you are the best person who can help us with it. Once this is sorted we are ready to go live: https://xtemos.com/forums/topic/minicart-widget-issue/
The delay and disappearance of Payment Gateways in MiniCart widget.
Regards,
SPOctober 6, 2023 at 3:51 pm #502279
Elise NoromitMemberHello,
We will send the information in this topic: https://xtemos.com/forums/topic/minicart-widget-issue/
Best Regards
October 6, 2023 at 6:00 pm #502317
spnutrateaParticipantThank you.
October 7, 2023 at 3:15 am #502369
Elise NoromitMemberYou are welcome!
Wish you a wonderful day!
-
AuthorPosts
The topic ‘Background scrolling in the responsive devices’ is closed to new replies.
- You must be logged in to create new topics. Login / Register