-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Dropdown: opens / closes when I click inside of the modal #3174
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
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
Can you reproduce it in a codesandbox? |
Added examples to Testcase section |
@zmixailz I am going to close this issue for housekeeping since we cannot reproduce what you are saying here. When you provide a working testcase with codesandbox or codepen, we can reopen. |
I added examples. Please reopen this bug. |
@zmixailz thanks for the examples. @layershifter you will probably know if this is a duplicate of a know issue in progress or not. |
I'm having the same issue with a Triggering the confirm by clicking on the menu items opens the confirm and hides the menu. Clicking within the confirm opens the menu dropdown again. I had a hunch that click events from the confirm were bubbling up to the <Confirm
...
onClick={e => e.stopPropagation();} /> That fixes the issue for me, but I'd rather not have to sprinkle these click handles throughout my |
Hello, |
Pressing TAB inside a form field inside a modal causes the same issue. adding stopPropagation event handlers for onKeyPress, onKeyDown and onKeyUp doesn't help. |
Actually, it sounds like another problem because we don't have anything like focus trap that will disallow to move focus outside |
FWIW, I have multiple fields inside my modal and I'm tabbing from field 1 to field 2 in there. So no focus events leaving the modal. However, your comment gave me the hint I needed for a workaround: stopping propagation of onFocus on the modal works! |
I am going to visit this place and address this problems, but I can't give any ETA 😿 |
There has been no activity in this thread for 180 days. While we care about every issue and we’d love to see this fixed, the core team’s time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one. However, PRs for this issue will of course be accepted and welcome! If there is no more activity in the next 180 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks! |
The issue still persists. I'm on version 0.88.2, If you have a modal inside of a dropdown. Once the modal is open clicking inside or pressing tabs, spaces will toggle the dropdown instead. This made using spaces inside a textarea impossible. However, stopping propagation onFocus and onClick fixes the issue. But still, this isn't the expected behaviour by any means. |
I am also getting this issue. Version is 0.88.2 as well. Codesandbox: https://codesandbox.io/s/semantic-ui-react-5j0io Repro steps:
You will notice that it is not interacting with the TextArea but instead with the Dropdown behind the modal. Sometimes if you click multiple times in the TextArea, the issue will stop and pressing Space will interact with the TextArea correctly. Adding this to the TextArea is a temporary fix.
Edit: My team also found that this stopPropagation doesn't completely eliminate the bug. If the modal has other elements, such as a dropdown, another text field, button, etc., and the user interacts with any of them, the text area will have this bug again if going back to the text area. All elements in the modal will likely need the same stopPropagation lines to avoid this behavior. |
issue.mp4This issue indeed still persists. Not necessarily broking the functionality of the app, but definitely unexpected behavior. <NewContainerFormModal
triggerElement={<Dropdown.Item >New PGContainer</Dropdown.Item>}
header={`Add container to ${props.name}.`}
hosts={props.hosts}
clusters={props.clusters}
dispatch={props.dispatch}
onClick={(e: any) => e.stopPropagation()}
/> |
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
Steps
Dropdown
andModal
components. PutDropdown.Item
as trigger intoModal
.Modal
toDropdown
as children.Modal
and click inside it several times.Expected Result
The state of dropdown does not change.
Actual Result
Dropdown opens / closes when I click inside of the modal.
Version
0.82.5.This worked in version 0.81.3
Testcase
Version 0.81.3: https://codesandbox.io/s/vy884pkzk0
Version 0.82.5: https://codesandbox.io/s/v0225n2r20
The text was updated successfully, but these errors were encountered: