Closed zaszlo closed 5 years ago
Hello, I definitely need more details, like:
Is it possible to do a quick repro on jsbin so I can take a look?
Thanks.
Chrome, that is automatically updating to newest version, newest stable swiper with the option hashNavigation: true
, jquery 1.12.4. and for zero-md also the webcomponents loader (newest, as the readme here instructs to configure it).
It would take me a while to prepare a repo, but I think any demo from swiper with that option so to have a hash in the url from start would trigger this problem. Not sure but probably it would be also triggered without swiper just a simple js to start out with a hash redirect present on the page, but not inside the md.
Oh that's because the numeric hash value is not a valid CSS selector, so <zero-md>
's anchor link feature throws an exception. Functionality is not affected though so everything still works.
As a quick workaround, trying renaming all your swiper slides' data-hash
value to something like slide1
etc.
...
<div class="swiper-slide" data-hash="slide1">
...
</div>
<div class="swiper-slide" data-hash="slide2">
...
</div>
...
I'll fix this in the next release which should land very soon. There are some changes to how web components should be loaded as well - basically the community has decided that HTMLImports
be deprecated in favour of ES Modules
.
Thank you.
Probably it is not related, but can you please give a hint on why the tabbable div disappears bellow that zero-md. Maybe there is something with how the zero-md loading works and thus the tabbable doesn't appear because of the zero-mds inside of it? It is interesting that the tabbable div pops up if I slide away and back or open the developer tools... Same thing on both Chrome and FF.
Hmm I'm not really sure what you mean.. From your code it seems that your tab elements are a child of only your first slide, and not other slides? If that's the case then your tabs will only appear in the first slide and not the others.
Right, the tab should appear in the first slide (only) as the page loads but it doesn't, only after sliding back and forth or opening the devtools in the browser.
Swiper is calculating the initial height wrong. It's probably a timing issue. <zero-md>
works asynchronously, so try adding a hook to tell Swiper to recalculate dimensions after <zero-md>
is done with rendering. Something like:
window.addEventListener('zero-md-rendered', function() {
if (mySwiper) { mySwiper.update(); }
});
Thank you! Works.
Hello,
I have components in the page that are called using hashes (those id/anchors are not inside md), the page loads but I get these errors, my console is bloated with them:
Is there a way to fix it?