react-sticky-el
react-sticky-el copied to clipboard
Issues with links and clickable elements
While in use with a table of contents element, links became unclickable, I was able to get over that issue by adding stickyClassName with a high z-index. but the issue persists when the element is not floating, and applying a className doesn't seem to solve it. Thanks for the effort with this module, I'll try to debug when I have the time to make a pull request. Here's an example snippet of my code:
<Sticky hideOnBoundaryHit={ false }
boundaryElement={ '#container' }
positionRecheckInterval={ 1 }
stickyClassName={s.sticky}
className={ s.sticky }
topOffset={ 70 }
>
<ul className={ s.cd_faq_categories } >
<li className={ s.link }>
<a href="#basics">
Link
</a>
</li>
</ul>
</Sticky>
The issue is caused by this div:
<div style="min-height: 0px;">
Which contains the sticky element.
HI @aihkas, if you give me an example (plunker, jsfiddle, codepen... ) I'll try to help you. Because right now, I'm not sure how to reproduce this issue
I also have this problem when a context menu is in the sticky zone. Normal buttons work, but not this library which supports touch events and is not triggered by a click like buttons are https://github.com/vkbansal/react-contextmenu/blob/master/docs/api.md
When I toggled off the sticky el my context menu works.
Will look into it more.