Comments (10)
just add a "return false" onclick handler and you are fine.
from css-modal.
Or use a button tag instead of a link?
from css-modal.
I think it's the doctype! ;D
Jokes aside, the reason is that the body is being set to overflow: hidden
, and I think @drublic is well aware of it and will find a good fix.
from css-modal.
Yes, I am very confident in @drublic's ability to find a fix as well. 👍 😄
from css-modal.
You may want to checkout @benschwarz http://benschwarz.github.io/gallery-css/ project where he uses a super cool trick to stop the jump happening by using hidden divs with the ids that then use general sibling combinator (~) to target the right item.
from css-modal.
Thanks @ryanseddon, I was actually going to PR something when I saw this project, but I hadn't had the chance yet.
from css-modal.
Thanks, Ryan! I'll check it out.
@benschwarz PR is always very welcome :)
from css-modal.
If I invested correctly, this means we need extra markup to target each hidden div. I use this method a lot for navigations, especially on mobile where you need a toggle button for the menu to be visible or not. It is also a method that I use in a modified version for the tabbed content on the page.
To be honest I don't think this will work perfectly with the modals since the jumping bug originates in preventing the overflow for the content an thus prevent scrolling the content.
I will try out some more and come up with a solution shortly.
from css-modal.
And here is the solution. Pretty easy. Please let me know if you find any bugs in this fix.
I've also added a test to prevent regression.
from css-modal.
Sweet. Works great now.
Am 10.05.2013 um 23:10 schrieb Hans Christian Reinl [email protected]:
And here is the solution. Pretty easy. Please let me know if you find any bugs in this fix.
I've also added a test to prevent regression.—
Reply to this email directly or view it on GitHub.
from css-modal.
Related Issues (20)
- Strange scrolling bug HOT 2
- Drop IE8 and Android 2 with next version HOT 1
- data-iframe-src HOT 1
- Scrolling issue on Android 5.0 HOT 3
- Namespace data-attributes
- Incorrect function calls - modal.js HOT 1
- <iframe> breaks the js HOT 2
- Question: modal height when using more than one div and JS
- AMD pattern nested inside
- Closing stackable modals
- ".modal-content" spacing inconsistencies
- Release latest version on npm HOT 1
- modal w/form & input fields shifts out of view when keyboard opens [iPhone-only] HOT 2
- Event handlers not registering properly
- Unnecessary scrollbar HOT 2
- Download v1.4.0 HOT 4
- html overflow property HOT 1
- video keeps playing after close HOT 5
- cssmodal:show / cssmodal:hide dialog reference in event HOT 2
- css bug! HOT 2
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 css-modal.