Added animation to portal preview height (#1977)

no issue

- add CSS transition for height attribute of portal preview container
- before adjusting height of container, apply styles to portal preview nested iframe to prevent scrollbars from showing
This commit is contained in:
Kevin Ansfield 2021-05-24 18:55:18 +01:00 committed by GitHub
parent baafe011a2
commit 956ec8f302
3 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@
src={{this.srcUrl}} src={{this.srcUrl}}
frameborder="0" frameborder="0"
allowtransparency="true" allowtransparency="true"
scrolling="no"
{{did-insert this.attachMessageListener}} {{did-insert this.attachMessageListener}}
{{did-update this.resetSrcAttribute @guid}} {{did-update this.resetSrcAttribute @guid}}
{{on "load" this.onLoad}} {{on "load" this.onLoad}}

View File

@ -260,6 +260,9 @@ export default class MembersAccessController extends Controller {
return; return;
} }
portalIframe.contentWindow.document.body.style.overflow = 'hidden';
portalIframe.contentWindow.document.body.style['scrollbar-width'] = 'none';
const portalContainer = portalIframe.contentWindow.document.querySelector('.gh-portal-popup-container'); const portalContainer = portalIframe.contentWindow.document.querySelector('.gh-portal-popup-container');
if (!portalContainer) { if (!portalContainer) {
return; return;

View File

@ -1645,6 +1645,7 @@ p.theme-validation-details {
margin-bottom: 32px; margin-bottom: 32px;
border-radius: 5px; border-radius: 5px;
pointer-events: none; pointer-events: none;
transition: height 0.35s ease-in-out;
} }
.gh-setting-members-portal-disabled { .gh-setting-members-portal-disabled {