Comments (4)
based on fullPage.js, there's an option called normalScrollElements
which sholud allow normal scrolling on specific elements. Try using it like this:
normalScrollElements: "#s-bl"
from cookieconsent.
Hi @dimmuboy,
unfortunately, there is no built-in option to do such a thing. You can however use a MutationObserver
— supported by all major browsers — to detect the open/closed state of the modal:
(function(){
const html = document.documentElement;
let isVisible = false, shouldShow = false;
const observer = new MutationObserver(function() {
shouldShow = html.className.indexOf('show--settings') > -1;
if(!isVisible && shouldShow){
isVisible = true;
console.log("modal is visible")
}else if(isVisible && !shouldShow){
isVisible = false;
console.log("modal is hidden")
}
});
observer.observe(html, {
attributes: true,
attributeFilter: ['class']
});
})();
from cookieconsent.
Great @orestbida, it works! I'm able to to disable and enable fullpage.js back now.
But I still have problem scroll content inside preferences window. When I try to scroll it do nothing :/
from cookieconsent.
Awesome! It works, thanks
from cookieconsent.
Related Issues (20)
- [Bug]: Modals not showing in Chrome HOT 3
- [Feat]: Placeholders in language json HOT 4
- [Feat]: allow dynamic translation files fetch
- [Bug]: playground requests to github api are rate limited
- [Bug]: Callbacks are not triggered in individually togglable services. HOT 3
- [Feat]: Event / callback for categories HOT 1
- [Bug]: Category with services - 'enabled' unexpected behaviour
- [Feat]: Better handling when translations are undefined
- [Bug]: Compatibility with GA4 consent and services HOT 4
- [Feat]: Disabling the category from configuration? HOT 1
- [Bug]: esm version has no cookieConsent variable HOT 7
- [DEMO]: NextJS 12 demo doesn't seem to work HOT 4
- [Bug]: 'type' declaration inside package.json is missing, causing it to be considered a CommonJS module HOT 3
- [Feat]: Google Consent Mode v2 HOT 10
- closeIconLabel with layout: "bar inline" HOT 1
- [Feat]: Lock scroll when modale is open HOT 4
- [Docs]: how to configure google consent mode HOT 9
- [Bug]: Translations HOT 2
- [Feat]: Toggle script with multiple data-categories HOT 1
- [Bug]: impossible to delete cookies from subdomain HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookieconsent.