question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IFrameDialog scrolling doesn't seem to work with list item form and isDlg=1

See original GitHub issue

Category

[ ] Enhancement

[X] Bug

[ ] Question

Version

Please specify what version of the library you are using: [ 6.13.4 ]

Expected / Desired Behavior / Question

I am using the iFrameDialog control in an SPFX development on SharePoint 2019 on prem. When I load a list form page using IsDlg=1 I and have set the scrolling property to ‘yes’ I expect that the dialog would load the page at the URL and if the content exceeded the size of the dialog specified by the length and width properties scrollbars would be shown.

Observed Behavior

The content returned exceeds the size of the dialog and no scrollbars are shown. Specifically the content is cut at the top (at the ribbon in the dialog).

Also, in the documentation the “seemless” property is noted as a string - in the interface a boolean is required. Additionally, the scrolling property is noted as being a string. What strings are acceptable? Is it expecting “yes”, “true”, “sure”. I think if yes or no this should be a boolean as well.

Steps to Reproduce

Add an IFrameDialog component to a project as below:

<IFrameDialog 
              url= {this.webURL + '/Lists/someList/DispForm.aspx?ID=13&IsDlg=1'}
              // iframeOnLoad={this._onIframeLoaded.bind(this)}
              hidden={false} // {this.state.hideDialog}
              // onDismiss={this._onDialogDismiss.bind(this)}
              scrolling={'yes'}
              modalProps={{
                  isBlocking: true,
                  className: 'customPNPDialog'                
              }}
              dialogContentProps={{
                className: 'customPNPDialogContent',
                type: DialogType.close,
                showCloseButton: true
              }}
              width={'600px'}
              height={'300px'}
            />

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AdiuTankT72commented, Sep 29, 2021

Workaround for those without jQuery: iframeOnLoad={(iframe: any) => { const head = iframe.contentDocument.head; const css = ‘<style>.ms-dialog body {overflow: inherit !important;}</style>’; head.insertAdjacentHTML(“beforeend”, css); }}

1reaction
Matej4386commented, Aug 27, 2020

I just found this closed topic - just to let others know. Workaround is: iframeOnLoad={(iframe: any) => { const head = $(iframe).contents().find("head"); const css = '<style>.ms-dialog body {overflow: inherit !important;}</style>'; $(head).append(css); } }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sharepoint edit form cancel not working. IsDlg=1?
It just seems incredibly funny that when IsDlg=1 the cancel button doesn't work. Nor does the cancel button on the ribbon. I understand...
Read more >
Why does SharePoint 2013 modal add "?IsDlg=1" to querystring
'?IsDlg=1' is how SharePoint knows to display a page as a dialog box. With this in the query string, the master page hides...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found