Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal component stop working when closed #6778

Closed
3 tasks done
GianlucaStudioAlive opened this issue Mar 17, 2024 · 6 comments · Fixed by react-restart/ui#99
Closed
3 tasks done

Modal component stop working when closed #6778

GianlucaStudioAlive opened this issue Mar 17, 2024 · 6 comments · Fixed by react-restart/ui#99
Labels

Comments

@GianlucaStudioAlive
Copy link

Prerequisites

Describe the bug

Hello everyone, last night i started i new project using nextjs 14.1.19 and what happened is when i load the main page, i have a button to open a modal , the modal opening fine but when i.m closing it, it seems like it just get an opacity:0 rule but it wont let me click anymore on my page, the page won't scroll too it seemes like the modal is stucked but invisible.
than i try te replace the entire page only with your Modal component and stil not working. I've trieed on others website i made with previous version of nextjs and is working fine. i apologize for my bad english and i'm here in case you need more descripotion.
many thanks to all
J.

Expected behavior

No response

To Reproduce

No response

Reproducible Example

dont have a link

Screenshots

No response

What operating system(s) are you seeing the problem on?

No response

What browser(s) are you seeing the problem on?

No response

What version of React-Bootstrap are you using?

2.10.1

What version of Bootstrap are you using?

5.3.3.

Additional context

No response

@kyletsang
Copy link
Member

Can you post some code or post a link to a reproducible example on github?

@GianlucaStudioAlive
Copy link
Author

"use client";
import { useState } from "react";
import {Button}from "react-bootstrap";
import {Modal} from "react-bootstrap";

function Example() {
const [show, setShow] = useState(false);

const handleClose = () => setShow(false);
const handleShow = () => setShow(true);

return (
<>

Launch demo modal

  <Modal show={show} onHide={handleClose} animation={false}>
    <Modal.Header closeButton>
      <Modal.Title>Modal heading</Modal.Title>
    </Modal.Header>
    <Modal.Body>Woohoo, you are reading this text in a modal!</Modal.Body>
    <Modal.Footer>
      <Button variant="secondary" onClick={handleClose}>
        Close
      </Button>
      <Button variant="primary" onClick={handleClose}>
        Save Changes
      </Button>
    </Modal.Footer>
  </Modal>
</>

);
}

export default Example;
this is the code i get form the bootstrap library.. it seems like not working on the latest version of nextjs. I asked a frined of mine too to try it on his computer and he got the same issue.
to install the bootstrap library i used npm install react-bootstrap bootstrap and than i added @import 'bootstrap/dist/css/bootstrap.min.css'; to the global css file..
many thanks for ur responde
J.

@kyletsang
Copy link
Member

Sorry inadvertently broke this upstream. Will cut a new release today

@kyletsang
Copy link
Member

Fixed in v2.10.2

@radar
Copy link

radar commented Mar 18, 2024

We just bumped into this as well. Thank you for getting a fix together so quickly!

@GianlucaStudioAlive
Copy link
Author

thank you so much now working fine !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants