Skip to content

Commit cb7b833

Browse files
authored
Merge pull request #839 from devtron-labs/chore/modal-outside-clicks
feat: remove stop propagation from modals
2 parents e2ea27a + 2a22c92 commit cb7b833

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.18.1-pre-2",
3+
"version": "1.18.1-pre-3",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/Modals/VisibleModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class VisibleModal extends React.Component<{
5858
onClick={this.handleBodyClick}
5959
initialFocus={this.props.initialFocus ?? undefined}
6060
>
61-
<div className={this.props.parentClassName} onClick={stopPropagation}>
61+
<div className={this.props.parentClassName}>
6262
<div className={`visible-modal__body ${this.props.className || ''}`}>{this.props.children}</div>
6363
</div>
6464
</Backdrop>

src/Common/Modals/VisibleModal2.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ export class VisibleModal2 extends React.Component<{
4040
onClick={this.handleBodyClick}
4141
initialFocus={this.props.initialFocus ?? undefined}
4242
>
43-
<div className={`visible-modal__body ${this.props.className || ''}`} onClick={stopPropagation}>
44-
{this.props.children}
45-
</div>
43+
<div className={`visible-modal__body ${this.props.className || ''}`}>{this.props.children}</div>
4644
</Backdrop>
4745
)
4846
}

src/Shared/Components/FloatingVariablesSuggestions/Suggestions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { ReactComponent as ICClose } from '@Icons/ic-cross.svg'
2020
import { ReactComponent as ICSearch } from '@Icons/ic-search.svg'
2121
import NoVariables from '@Images/no-artifact.webp'
2222
import { DebouncedSearch, GenericEmptyState, Progressing, Reload } from '@Common/index'
23-
import { ComponentSizeType } from '@Shared/constants'
23+
import { ALLOW_ACTION_OUTSIDE_FOCUS_TRAP, ComponentSizeType } from '@Shared/constants'
2424

2525
import { Button, ButtonStyleType, ButtonVariantType } from '../Button'
2626
import { Icon } from '../Icon'
@@ -87,7 +87,7 @@ const Suggestions = ({
8787

8888
<div className="h-100">
8989
<Button
90-
icon={<ICClose />}
90+
icon={<ICClose className={ALLOW_ACTION_OUTSIDE_FOCUS_TRAP} />}
9191
ariaLabel="Close suggestions"
9292
showAriaLabelInTippy={false}
9393
dataTestId="deactivate-suggestions"

0 commit comments

Comments
 (0)