mark-steven-au premium asked 4 years ago


Expected behavior Method to disable vertical scrolling in MDBIframe Actual behavior Have tried a number of methods overflow="hidden" scrolling="no" scrolling="false" style={{ scrolling: no }} hidden etc Resources (screenshots, code snippets etc.) Is there a way to disable scrolling


Magdalena Dembna staff commented 4 years ago

Can you edit your post so it includes a code snippet? Best regards, Magdalena


mark-steven-au premium answered 4 years ago


Hi Magdalena, Not much to post really as it is default MDB page modal with an Iframe insert. Basically do not want the modal to scroll at all.

import React, { Component } from "react";

import { MDBBtn, MDBModal, MDBModalBody, MDBModalFooter, MDBRow, MDBIcon, MDBIframe } from "mdbreact";

class IframePage extends Component { state = { modal11: false, }

toggle = nr => () => {
    let modalNumber = "modal" + nr;
    this.setState({
        ...this.state,
        [modalNumber]: !this.state[modalNumber]
    });
}


render() {
    return (
        <MDBRow>
            <MDBBtn onClick={this.toggle(11)}>Launch  Connect</MDBBtn>
            <MDBModal size="md" isOpen={this.state.modal11} toggle={this.toggle(11)}>

                <MDBModalBody className="mb-0 p-0">


                    <MDBIframe allowFullScreen title="connect" src="https://vmixcall.com" >
                        <img src="Vmixcalllogo-300-bl.png" />
                    </MDBIframe>
                </MDBModalBody>
                <MDBModalFooter className="justify-content-center">

                    <MDBBtn color="primary" outline rounded size="md" className="ml-4" onClick={this.toggle(11)}>
                        Close
      </MDBBtn>
                </MDBModalFooter>
            </MDBModal>
        </MDBRow >
    );
}

}

export default IframePage;


Magdalena Dembna staff commented 4 years ago

Unfortunately, there's no such functionality built-in mdbModal. If you want to disable scrolling you need to create a custom function to do it. Best regards, Magdalena



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: 4.27.0
  • Device: iOS
  • Browser: all
  • OS: iOS
  • Provided sample code: No
  • Provided link: No