diff --git a/src/frontend/src/components/details/DetailsImage.tsx b/src/frontend/src/components/details/DetailsImage.tsx
index 7bd6f62ff7..d6da80ad9c 100644
--- a/src/frontend/src/components/details/DetailsImage.tsx
+++ b/src/frontend/src/components/details/DetailsImage.tsx
@@ -267,7 +267,10 @@ function ImageActionButtons({
variant="outline"
size="lg"
tooltipAlignment="top"
- onClick={() => {
+ onClick={(event: any) => {
+ event?.preventDefault();
+ event?.stopPropagation();
+ event?.nativeEvent?.stopImmediatePropagation();
modals.open({
title: {t`Select Image`},
size: 'xxl',
@@ -285,7 +288,10 @@ function ImageActionButtons({
variant="outline"
size="lg"
tooltipAlignment="top"
- onClick={() => {
+ onClick={(event: any) => {
+ event?.preventDefault();
+ event?.stopPropagation();
+ event?.nativeEvent?.stopImmediatePropagation();
modals.open({
title: {t`Upload Image`},
children: (
@@ -304,7 +310,12 @@ function ImageActionButtons({
variant="outline"
size="lg"
tooltipAlignment="top"
- onClick={() => removeModal(apiPath, setImage)}
+ onClick={(event: any) => {
+ event?.preventDefault();
+ event?.stopPropagation();
+ event?.nativeEvent?.stopImmediatePropagation();
+ removeModal(apiPath, setImage);
+ }}
/>
)}
@@ -329,6 +340,16 @@ export function DetailsImage(props: DetailImageProps) {
const permissions = useUserState();
+ const expandImage = (event: any) => {
+ event?.preventDefault();
+ event?.stopPropagation();
+ event?.nativeEvent?.stopImmediatePropagation();
+ modals.open({
+ children: ,
+ withCloseButton: false
+ });
+ };
+
return (
<>
@@ -337,18 +358,10 @@ export function DetailsImage(props: DetailImageProps) {
src={img}
height={IMAGE_DIMENSION}
width={IMAGE_DIMENSION}
+ onClick={expandImage}
/>
{permissions.hasChangeRole(props.appRole) && hovered && (
- {
- modals.open({
- children: ,
- withCloseButton: false
- });
- }}
- >
+
-
+
+
+
+
+
+
+
+