title: Styling on a React Link element causes click to break
body: <p>So, this one I just cannot figure out.
  I tried a custom (in my head, simple and elegant) solution for pagination, but I realize it's maybe not that.
  But still, it kinda works and the way it now breaks doesn't make sense at all.</p>
  <p>For this, I use a combination of Pagino (partial edit from other SO answers) &amp; react-scroll imports.</p>
  <p>Inside the render function:</p>
  <pre><code>         &lt;div id=&quot;cardList-pagino-buttons&quot;&gt;
            &lt;ul&gt;
              {pages.map((page) =&gt; (
                &lt;Link to={&quot;cardpage-&quot;+(page !== &quot;next&quot; || &quot;previous&quot; ? pagino.page : page)} 
                key={page} onClick={() =&gt; hanglePaginoNavigation(page)} 
                  spy={true} smooth={true} duration={100} containerId=&quot;cardList-pagino-container&quot;&gt;
                  {/* { page == &quot;end-ellipsis&quot; || &quot;start-ellipsis&quot; ? &quot;...&quot; : page} */}
                  {page}
                &lt;/Link&gt;
              ))}
            &lt;/ul&gt;
          &lt;/div&gt;
          &lt;Element id=&quot;cardList-pagino-container&quot;&gt;
           {/* Cardlist renders multiple: &lt;div id='cardpage-[index]'&gt;[CardData]&lt;/div&gt; */}
            &lt;CardList cardList={cardList}/&gt; 
          &lt;/Element&gt;
        &lt;/div&gt;
  
  </code></pre>
  <p>the hanglePaginoNavigation function:</p>
  <pre><code>    const hanglePaginoNavigation = (type) =&gt; {
        if (typeof type === &quot;string&quot;) {
          // Something wrong with the start and end elepsis, Coffeescript = pagino[type]?.();
          // pagino[type]();
          let nxtoprv = type == &quot;next&quot; ? pagino.page + 1 : pagino.page - 1,
              currentPage = document.getElementById(&quot;cardpage-&quot;+nxtoprv);
          currentPage.scrollIntoView({
            behavior: &quot;smooth&quot;,
            block: &quot;nearest&quot;
          });
          pagino.setPage(nxtoprv);
        } else {
          let page = document.getElementById(&quot;cardpage-&quot;+type);
          page.scrollIntoView({
            behavior: &quot;smooth&quot;,
            block: &quot;nearest&quot;
          });
          pagino.setPage(type);
        }
      };
  </code></pre>
  <p>and for what it's worth, pagino (just keeps track of pages tho):</p>
  <pre><code>    const [pages, setPages] = useState([]);
  
      const pagino = useMemo((counting = 0) =&gt; {
        const _ = new Pagino({
          showFirst: false,
          showLast: false,
          siblingCount: 10,
          boundaryCount: 0,
          onChange: (page, count) =&gt; setPages(_.getPages())
        });
        _.setCount(counting);
    
        return _;
      }, []);
  </code></pre>
  <p>So still rather simple in the outcome:
  I have a couple of rendered links that correspond to different pages which are rendered inside the element 'pagino-container'.
  When I click on one of the links, inside the div it scrolls to the clicked page.</p>
  <p>It works as I have it now. If it's that elegant, or simply I don't know.</p>
  <p>But now the strange thing.
  If I start adding styles to the rendered links, and I am talking simple 1px borders and some padding, suddenly it breaks, and the clicks on the link do nothing... (sorry re-phrase, the click is actually registered, just the scrolling doesn't get triggered anymore, which is strange, as nothing is changed for id's or anything, and positioning for the scrolling content is also not changed)
  It doesn't matter if it's loaded through CSS, or through inline-style.</p>
  <p>To make it a bit more strange.
  if only one of the buttons has a border, the scrolling only works for the first click on any of the buttons.
  if all the buttons have a border, not any scrolling occurs.
  And if I just add styles through dev-tools, it keeps working no matter what..</p>
  <p>Does anyone have an idea what can cause this?</p>
  <p>**Edit:
  Well,
  Apparently the conditional in the Link element got mirrored and this seems to have caused it.
  What the styling had to do with it is beyond me</p>