<?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: MobilePortrait layout renders differently in JavaScript SDK embed vs Power BI Service in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5232829#M65264</link>
    <description>&lt;P class=""&gt;&lt;SPAN&gt;I'm using the latest version of the powerbi-client SDK. I noticed that this issue happens when the PBIR model is enabled, so it seems to be a PBIR limitation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I try to run JavaScript to validate whether the page has a Mobile Layout, the result is not returning &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jun 2026 12:54:38 GMT</pubDate>
    <dc:creator>rafaelmpsantos</dc:creator>
    <dc:date>2026-06-24T12:54:38Z</dc:date>
    <item>
      <title>MobilePortrait layout renders differently in JavaScript SDK embed vs Power BI Service</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5230421#M65261</link>
      <description>&lt;P&gt;I'm experiencing a significant rendering difference when embedding a report using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;layoutType: models.LayoutType.MobilePortrait&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;via the Power BI JavaScript SDK compared to how the same mobile layout appears in the Power BI Service (powerbi.com mobile preview).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;powerbi-client SDK version: 2.23.1&lt;/LI&gt;&lt;LI&gt;Browser: Chrome/Edge (latest)&lt;/LI&gt;&lt;LI&gt;Embed type: App Owns Data (Embed Token)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt;&lt;BR /&gt;When I view the mobile layout in the Power BI Service (Edit mode &amp;gt; Mobile Layout preview), everything renders correctly:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Button slicers display in a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;3×2 grid&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(Receitas, Custos, Despesas / Encargos, Resultados, Provisões)&lt;/LI&gt;&lt;LI&gt;Matrix/table shows all columns (Descrição, jan/2024, fev/2024)&lt;/LI&gt;&lt;LI&gt;Content is properly scaled and fits the viewport&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;However, when embedding with the SDK using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;MobilePortrait, the same report renders broken:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Button slicers are forced into a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;single horizontal row&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;with truncated text (e.g., "Rec ei...", "Cus to...")&lt;/LI&gt;&lt;LI&gt;Table/matrix only shows the "Descrição" column, numeric columns are cut off&lt;/LI&gt;&lt;LI&gt;Content appears zoomed in / oversized regardless of container width&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;What I've tried (none resolved the issue):&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;OL&gt;&lt;LI&gt;Container widths from 280px to 100% viewport&lt;/LI&gt;&lt;LI&gt;customLayout: { displayOption: models.DisplayOption.FitToWidth }&lt;/LI&gt;&lt;LI&gt;customLayout: { displayOption: models.DisplayOption.FitToPage }&lt;/LI&gt;&lt;LI&gt;Adding&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;amp;isMobile=true&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to the embed URL&lt;/LI&gt;&lt;LI&gt;Meta viewport tag with proper mobile settings&lt;/LI&gt;&lt;LI&gt;Various combinations of hiding/showing panes and status bar&lt;/LI&gt;&lt;/OL&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Expected behavior:&lt;/STRONG&gt;&lt;BR /&gt;The SDK should render the mobile layout identically to how it appears in the Power BI Service mobile preview — with visuals properly scaled and wrapped within the canvas width.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Actual behavior:&lt;/STRONG&gt;&lt;BR /&gt;The SDK seems to render the mobile visuals directly into the container without applying the same internal scaling/canvas logic that the Power BI Service uses. This causes visuals designed for mobile (especially button slicers and tables) to overflow and truncate.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;BR /&gt;Is there a configuration or workaround to make the JavaScript SDK&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;MobilePortrait&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;embed render exactly like the Power BI Service mobile preview? Is this a known limitation of the SDK?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.jpg" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1353269i74D7D2D0481226F0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.jpg" alt="Untitled.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2026 18:54:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5230421#M65261</guid>
      <dc:creator>rafaelmpsantos</dc:creator>
      <dc:date>2026-06-23T18:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: MobilePortrait layout renders differently in JavaScript SDK embed vs Power BI Service</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5232625#M65263</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/47526"&gt;@rafaelmpsantos&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;From the screenshots and the behavior you're seeing, this seems more tied to how the report renders in the embedded mobile experience than to the embed configuration itself. The layoutType: models.LayoutType.MobilePortrait setting loads the report's mobile layout, but visuals like button slicers, tables, and matrices can still behave differently when embedded, which can lead to truncated text, clipped columns, or scaling differences.&lt;/P&gt;
&lt;P&gt;Since you've already tested container sizing, FitToWidth, FitToPage, isMobile=true, and the viewport settings, you've covered most of the common configuration options. As a next step, I'd recommend trying the latest powerbi-client SDK version to see whether there are any rendering improvements.&lt;/P&gt;
&lt;P&gt;If the behavior stays the same, it may be worth validating the report specifically in the embedded scenario and adjusting the mobile layout where needed. For example, responsive visuals or dropdown slicers may work better than button-grid slicers, and wide matrix/table layouts may need to be simplified for smaller screens.&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-create-mobile-optimized-report-best-practices" target="_blank"&gt;Best practices for creating mobile-optimized Power BI reports - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-create-mobile-optimized-report-format-visuals#alternate-formatting-options-for-visuals-and-slicers" target="_blank"&gt;Optimize visual formatting for mobile layout - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/mobile" target="_blank"&gt;Embedding a Power BI report with mobile layout in Power BI embedded analytics | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2026 11:40:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5232625#M65263</guid>
      <dc:creator>v-saisrao-msft</dc:creator>
      <dc:date>2026-06-24T11:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: MobilePortrait layout renders differently in JavaScript SDK embed vs Power BI Service</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5232829#M65264</link>
      <description>&lt;P class=""&gt;&lt;SPAN&gt;I'm using the latest version of the powerbi-client SDK. I noticed that this issue happens when the PBIR model is enabled, so it seems to be a PBIR limitation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I try to run JavaScript to validate whether the page has a Mobile Layout, the result is not returning &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2026 12:54:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5232829#M65264</guid>
      <dc:creator>rafaelmpsantos</dc:creator>
      <dc:date>2026-06-24T12:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: MobilePortrait layout renders differently in JavaScript SDK embed vs Power BI Service</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5250753#M65280</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/47526"&gt;@rafaelmpsantos&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for the update. Since you're already on the latest powerbi-client SDK, you can use page.hasLayout(models.LayoutType.MobilePortrait) to determine whether the page includes a Mobile Portrait layout. The documentation says this method returns a boolean that indicates whether the page has the specified layout. Microsoft also notes that if a page doesn't have a Mobile Portrait layout, it will be loaded with the MobileLandscape layout.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/mobile#check-if-a-report-page-has-mobile-layout" target="_blank"&gt;Embedding a Power BI report with mobile layout in Power BI embedded analytics | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2026 06:09:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5250753#M65280</guid>
      <dc:creator>v-saisrao-msft</dc:creator>
      <dc:date>2026-06-29T06:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: MobilePortrait layout renders differently in JavaScript SDK embed vs Power BI Service</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5260887#M65289</link>
      <description>&lt;P&gt;The method&amp;nbsp;&lt;SPAN&gt;page.hasLayout(models.LayoutType.MobilePortrait)&amp;nbsp; does not works in PBIR reports. It's a bug.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2026 11:16:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5260887#M65289</guid>
      <dc:creator>rafaelmpsantos</dc:creator>
      <dc:date>2026-07-01T11:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: MobilePortrait layout renders differently in JavaScript SDK embed vs Power BI Service</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5263610#M65293</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/47526"&gt;@rafaelmpsantos&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thank you for the update. Since you've reproduced the behavior and believe this is a bug specific to PBIR reports, I'd recommend raising a Microsoft Support ticket.&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/support/create-support-ticket" target="_blank"&gt;Create a Fabric and Power BI Support Ticket - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2026 08:56:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/MobilePortrait-layout-renders-differently-in-JavaScript-SDK/m-p/5263610#M65293</guid>
      <dc:creator>v-saisrao-msft</dc:creator>
      <dc:date>2026-07-02T08:56:04Z</dc:date>
    </item>
  </channel>
</rss>

