Modal: closing on clicking inside itself after height change
See original GitHub issueBug Report
After adding more input fields in modal, clicking on plain link causes modal close. Seems like the height is changed and initial calculation of modal rectangle became outdated, so it behaves like on clicking outside of the modal.
Of course, closeOnDimmerClick={false} prop prevents this strange behavior.
Steps
- go to test case sandbox
- open modal by clicking Login (top left corner, also zoom out to see the links of modal)
- click Register link of the modal (the form just got bigger and Login click is out of initial dimension of the modal)
- click Login link of the modal
Expected Result
Modal is open
Actual Result
Modal is closed
Version
Semantic-UI React 0.81.1
Testcase
https://codesandbox.io/s/30n2v379r1 Semantic-UI CSS 2.2.13 upd. https://codesandbox.io/s/n70787j0yp Semantic-UI CSS 2.3.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Bootstrap Modal immediately disappearing - Stack Overflow
The problem is that as soon as I click on the button, the modal fades in and then immediately disappears. I'd appreciate any...
Read more >Modal - Bootstrap
Clicking on the modal “backdrop” will automatically close the modal. Bootstrap only supports one modal window at a time. Nested modals aren't supported...
Read more >Considerations for Styling a Modal | CSS-Tricks
Heights are even more likely to change since height always related to the content inside. If you are absolutely certain of the height...
Read more >Bootstrap 5 Modal - W3Schools
Change the size of the modal by adding the .modal-sm class for small modals ... it is possible to only scroll inside the...
Read more ><Modal/> Component - React-Bootstrap
Close Save changes ... import Button from 'react-bootstrap/Button'; ... When backdrop is set to static, the modal will not close when clicking outside...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ve updated testcase to use SUI 2.3. However, I think that the problem is caused by removal of a click’s target node.
This issue will be closed due to lack of activity for 12 months. If you’d like this to be reopened, just leave a comment; we do monitor them!