Comments (18)
At first sight it appears you are trying to initialize the plugin into a iframe of facebook. This won't work due to a cross-origin exception (the same thing which is happening now). But this isn't a plugin error, this happens because facebook doesn't want you to modify their content.
Please upload a small codesample of the facebook SDK on https://jsfiddle.net/, so I can get a deeper understanding of the problem. Maybe there is some workaround or I am misunderstanding it right now.
from overlayscrollbars.
Thx, here's my code (i don't use any iframe but the facebook SDK create one...) :
https://jsfiddle.net/fredleput/cpzjq61u/
I get the error even if i use https. If i don't instanciate scrollbar error disappear.
from overlayscrollbars.
https://jsfiddle.net/cpzjq61u/3/
This script creates a div with the id #fb-root
but I don't see any facebook content or anything?... To fix your problem, I have to see how the content which is loaded by the SDK really looks like. Please offer a version where the SDK is fully loaded and the content actually appears. Ignore the initialization of my plugin completely.
from overlayscrollbars.
you can see it in action here :
https://www.cc-paimpol-goelo.com/maquettes_cyber/gp3a-2/
from overlayscrollbars.
Well the scrollbar is loaded correctly on the element with the id #actualites-resumes-liste
.
Am I overlooking something?
- Tested with Firefox, Chrome, Edge and IE
from overlayscrollbars.
With the same content here's a screenshot of chrome's console with error message :
from overlayscrollbars.
I am unable to reproduce this error... Screenshot
Maybe this article can help you?
I am sorry, but it seems like this error occurs because of your browser. Try to load jQuery not from a CDN but localy from your server. Theres a possibility this error occurs because of the async loading of the facebook SDK, but you have to test this somehow... I honestly have no clue and can only guess whats the error.
from overlayscrollbars.
Thx i'll test that soon.
from overlayscrollbars.
Well I've got other ideas:
Try to load the Facebook SDK after the plugin was initialized, or try to load it in a capsulated div and not direct into the body.
from overlayscrollbars.
Hi,
My problem is solved but i don't know why. I load jquery from my server but i still add the same issue. It's only when i initialize the plugin via jquery instead of the default way that the problem disappeared.
from overlayscrollbars.
I'm glad your problem has been solved!
I've checked your code and I've noticed you are using v1.0.0 of the plugin. Please try to use the current version (v1.2.3) and report me if your website runs fine with it too.
Your can get v1.2.3 here.
Thanks!
from overlayscrollbars.
No problem with version 1.2.3 in my news module but i try to use it also in my customs overlays (fixed positioned div with content) and i don't succeed.
I initialize the plugin like this :
jQuery(overlayMainContent).overlayScrollbars({ overflowBehavior : { x: 'h', y: 'v-s' }, scrollbars: { visibility: 'v' }, callbacks : { onInitialized : function() { console.log('initialized'); console.dir(this); } } });
Initilization seems working (i have log in console) but scrollbars aren't created. I send you a screenshot. You can see it in action here :
http://www.cc-paimpol-goelo.com/maquettes_cyber/gp3a-2/
just choose a news and click on 'En savoir plus'
screenshot-1 : we can see that classes are added to the container
screenshot-2 : log i call in the onInitialized callback
Thx very much for your help, ireally appreciate !
from overlayscrollbars.
Well, the mistake is, that you are loading different content into your div. This content is overwriting the DOM structure of the plugin.
To fix this you have two possibilites:
- Use a wrapper and initialize the plugin to the wrapper. Here is a demo: https://jsfiddle.net/Lesway8u/6/
The key is to let the wrapper div#wrapper
untouched (only initialize the plugin to this div) and load everything into#content
. - You have to initialize the plugin each time your window gets opened and destroy it each time it gets closed.
I recommend the first solution since its more performent and more "elegant".
from overlayscrollbars.
Of course, i didn't thought to that ! It works great now. Many thx, you're the best !
from overlayscrollbars.
I'm glad I could help you!
I'll close this issue now, if you have any other questions don't hesitate to ask them.
from overlayscrollbars.
i have the same issue with google ads and overlayscrollars
from overlayscrollbars.
@eagle-design Please open a new issue with your problem. Don't forget to provide or create a small example on https://jsfiddle.net so I can better understand your issue.
from overlayscrollbars.
i had fixed it by enabling cords
from overlayscrollbars.
Related Issues (20)
- Need A Clear, Simple, React Example HOT 1
- Unable to get overlay scrollbar on the Vue Portal element HOT 5
- overlayscrollbars svelte webpack: Cannot read properties of undefined (reading '$$') HOT 6
- Per axis visibility? HOT 6
- OverlayScrollbar Tutorial HOT 5
- Trying to use this package through npm but can't. What am I doing wrong? HOT 1
- request HOT 2
- Typescript compile error: @types/react/jsx-runtime"' has no exported member 'JSX' HOT 12
- How do I make the scrollbar sticky? HOT 5
- OverlayScrollbarsComponent does not render server-side HOT 2
- Native scrollbar is visible on iOS HOT 15
- Can you provide the. scss format for the style HOT 5
- Wrong handle position with reversed scroll HOT 5
- Add support namespace HOT 2
- Error caused when routing HOT 5
- How to hide scrollbars on print? HOT 3
- Unexpected scrolling when scrolling container is focused HOT 3
- `clickScroll` with `pointerType: "pen"`: scroll is aborted if pen leaves scrollbar track HOT 13
- Is it possible to add plugin for react hook version of OS? HOT 1
- V2 : Help with js code to Detect scroll to bottom with
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 overlayscrollbars.