Comments (3)
The reason an error is thrown on invisible elements is exactly because there is an inconsistency across browsers when getting the client dimensions for an element. The logic to get reasonable dimensions quickly becomes complicated (if the parent element is also invisible, for example). I'll look into this again, though it may require a more explicit workaround than just falling back to the parent element.
from holder.
I am also having a similar issue. It seems to happen on the BootStrap 3.0+ carousel, but only for slides that are not yet visible (set with the class of "active").
In Chrome, the size (hxw) seems to be maintained, but in FF, the size for the slides not yet visible is not honored at all.
Any suggestions or progress on a potential fix?
from holder.
This likely won't have a permanent fix, due to the previously mentioned problems. The logic just gets too complicated when considering all possible cases. However, since an error callback has been introduced, there is a workaround that will continuously attempt to render all invisible placeholders. You'll have to override the error callback in the following way:
Holder.invisible_error_fn = function(fn){
return function(el){
setTimeout(function(){
fn.call(this, el)
}, 10)
}
}
This workaround does not provide optimal performance, so it should only be used in special cases. You can also use the callback to create a solution that works in your case.
from holder.
Related Issues (20)
- Support Turbolinks 5 HOT 1
- (angular) binding to data-src HOT 3
- [Enhancement] Diagonal lines/border? HOT 8
- Support outline for rounded corners
- How to make images scaled down? HOT 1
- Image with no text HOT 2
- "size" attribute has no affect when using 100% width HOT 1
- Add support for specified aspect ratios. HOT 1
- holderjs not working inside tinymce [fiddle included] HOT 2
- 100% x 100% giving <svg> error in Chrome Canary Version 69.0.3494.0 (Official Build) canary (64-bit) HOT 1
- Could not set size lesser than certain value HOT 1
- holder.js does not work when the page renders twice in React HOT 14
- Refer to FontAwesome icons by their class names HOT 1
- high cpu usage HOT 2
- Issue with rendering in React using state variables HOT 2
- old dependency version prevent install with engine-strict=true HOT 3
- Need to replace `robloach/component-installer` HOT 3
- yoieh:patch-1
- Holderjs with Vite
- How can I use Holder.js in Next.js App Router?
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 holder.