<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Power BI Embedded Stealing Focus in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Stealing-Focus/m-p/4552151#M59620</link>
    <description>&lt;P&gt;I finally found a better solution for this. My answer is posted here:&amp;nbsp;&lt;A href="https://stackoverflow.com/a/79464986/22828" target="_blank"&gt;https://stackoverflow.com/a/79464986/22828&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2025 22:51:22 GMT</pubDate>
    <dc:creator>Bob_Archer</dc:creator>
    <dc:date>2025-02-24T22:51:22Z</dc:date>
    <item>
      <title>Power BI Embedded Stealing Focus</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Stealing-Focus/m-p/238838#M7490</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have embedded a Power BI report&amp;nbsp;at&amp;nbsp;the bottom of a&amp;nbsp;web page. It was all good unitl recently when the Power BI embedded frame started stealing the focus.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't have any issue before and it only started happening in the last few days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My search for solution brought me to a &lt;A href="https://blogs.msdn.microsoft.com/charles_sterling/2017/02/07/power-bi-publish-to-web-iframe-stealing-focus/" target="_self"&gt;page&lt;/A&gt; where funnily the problem is replicated. If you visit that page &lt;A href="https://blogs.msdn.microsoft.com/charles_sterling/2017/02/07/power-bi-publish-to-web-iframe-stealing-focus/" target="_blank"&gt;https://blogs.msdn.microsoft.com/charles_sterling/2017/02/07/power-bi-publish-to-web-iframe-stealing-focus/&lt;/A&gt; you'll notice that the page auto scrolls to embedded Power BI report once the page load is complete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can any one please tell me why this might be happening and what I can do to resolve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 06:56:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Stealing-Focus/m-p/238838#M7490</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-25T06:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Embedded Stealing Focus</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Stealing-Focus/m-p/239524#M7499</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Anonymous&lt;/LI-USER&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have embedded a Power BI report&amp;nbsp;at&amp;nbsp;the bottom of a&amp;nbsp;web page. It was all good unitl recently when the Power BI embedded frame started stealing the focus.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn't have any issue before and it only started happening in the last few days.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My search for solution brought me to a &lt;A href="https://blogs.msdn.microsoft.com/charles_sterling/2017/02/07/power-bi-publish-to-web-iframe-stealing-focus/" target="_self"&gt;page&lt;/A&gt; where funnily the problem is replicated. If you visit that page &lt;A href="https://blogs.msdn.microsoft.com/charles_sterling/2017/02/07/power-bi-publish-to-web-iframe-stealing-focus/" target="_blank"&gt;https://blogs.msdn.microsoft.com/charles_sterling/2017/02/07/power-bi-publish-to-web-iframe-stealing-focus/&lt;/A&gt; you'll notice that the page auto scrolls to embedded Power BI report once the page load is complete.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can any one please tell me why this might be happening and what I can do to resolve this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Anonymous&lt;/LI-USER&gt;&lt;/P&gt;
&lt;P&gt;Based on my research, there's no elegant solution for preventing the stealing focus. You can try the workaround in that link or my workaround as below. I hide the iframe when loading the page and after 2 seconds(2 seconds usually is enough to bypass the iframe focus event phrase)&amp;nbsp;let it show.&lt;/P&gt;
&lt;PRE&gt;&amp;lt;html&amp;gt;

&amp;lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"&amp;gt;&amp;lt;/script&amp;gt; 

&amp;lt;script type="text/javascript"&amp;gt;   

window.onload = function () { 

$("#embedIframe").hide();


&amp;lt;!-- put other line heres--&amp;gt; 


var delayMillis = 2000; //2 second

setTimeout(function() { 

$("#embedIframe").show();
   
}, delayMillis);
}
 
 
&amp;lt;/script&amp;gt; 
&amp;lt;p&amp;gt; Good day&amp;lt;/p&amp;gt;  
&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;
&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;
&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;
&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt; 

&amp;lt;iframe id="embedIframe" width="800" height="600"   

src="https://app.powerbi.com/view?r=eyJrIjoiM2I0YWMxMTItYjdmMC00Y2EzLWFkODEtZDY0OTM5NDM5YWU1IiwidCI6IjA4YTBiODI0LTU2ZjktNDk4My1hYzhhLTNmZDM3M2Y2ODQ2NiIsImMiOjF9" frameborder="0" allowFullScreen="true"&amp;gt;&amp;lt;/iframe&amp;gt; 

&amp;lt;/html&amp;gt;  &lt;/PRE&gt;</description>
      <pubDate>Sat, 26 Aug 2017 02:43:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Stealing-Focus/m-p/239524#M7499</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-08-26T02:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Embedded Stealing Focus</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Stealing-Focus/m-p/239953#M7508</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6971" data-lia-user-login="Eric_Zhang" class="lia-mention lia-mention-user"&gt;Eric_Zhang&lt;/a&gt;&amp;nbsp;Thanks for sharing the solution, works like charm. I'll share this with&amp;nbsp;my web developers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We didn't have this problem until only a&amp;nbsp;few days back. Any reason why this might be happening now and not earlier?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 01:32:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Stealing-Focus/m-p/239953#M7508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-28T01:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Embedded Stealing Focus</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Stealing-Focus/m-p/3989614#M53369</link>
      <description>&lt;P&gt;This is one of the option. But anyone can get the url using view the page source. I just try your answer. I can get the power BI URL. Is there any other options?.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 21:42:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Stealing-Focus/m-p/3989614#M53369</guid>
      <dc:creator>Ganesan-Elroi</dc:creator>
      <dc:date>2024-06-12T21:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Embedded Stealing Focus</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Stealing-Focus/m-p/4552151#M59620</link>
      <description>&lt;P&gt;I finally found a better solution for this. My answer is posted here:&amp;nbsp;&lt;A href="https://stackoverflow.com/a/79464986/22828" target="_blank"&gt;https://stackoverflow.com/a/79464986/22828&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2025 22:51:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Stealing-Focus/m-p/4552151#M59620</guid>
      <dc:creator>Bob_Archer</dc:creator>
      <dc:date>2025-02-24T22:51:22Z</dc:date>
    </item>
  </channel>
</rss>

