title: Prevent Element.scrollIntoView() function, where Element is in an iframe, from scrolling the parent
body: <p>I have a page with the following function:</p>
  
  <pre><code>function aux_func(_this){
              let link = document.getElementById("oLink").href;
              var elmnt = _this.contentDocument.getElementById(link);
              elmnt.scrollIntoView({ behavior: "smooth", block: "center"  });
          }
  </code></pre>
  
  <p>Where oLink is an element in the page and elmnt is a link in the html loaded in the srcdoc of an iframe.</p>
  
  <p>The function is called like this:</p>
  
  <pre><code>&lt;iframe id="cFrame" srcdoc="{{t1}}" onload="aux_func(this)"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>Where {{t1}} is some html sent by Django (I am using templates). And the iframe is in the page (Ill call it parent from now on).</p>
  
  <p>Anyways, I want to automatically scroll to elmnt when the frame content is loaded. BUT I want to prevent the parent from being scrolled. So I only want the iframe's scroll bars to move.</p>
  
  <p>Any idea how to do that? I cannot use :</p>
  
  <pre><code>overflow: hidden
  </code></pre>
  
  <p>or any similar property as I still need to access other elements in the parent and the iframe.</p>